Hello,
Im a student doing my final year mini project and am facing a problem related to searching data in the datagrid.
The error im getting is :

Run-time error : '3001'
Arguments are of wront type, are out of acceptable range, or are in conflict with one another

The code is :

Private Sub Command1_Click()
Dim item As String
    Adodc1.Recordset.MoveFirst
    item = Text1.Text
    Adodc1.Recordset.Find "L_No = " & item
    If Adodc1.Recordset.EOF Then
        MsgBox "Record Set not found"
    End If
End Sub

The above code is working when the data im seaching is only number.
For example
When I search the data on the basis of L_Id which is a License ID an Integer value the searching is done and I'm getting the result.
When I search the data on the basis of L_No which is a Lincense Number a string value which consists of both numbers and alphabets im getting the above error.
Do I have to parse the value is text1.text or do anything else?
This is the last part remaining in my project. Hope i get the solution.
Thank You

found the answer

Adodc1.Recordset.Find "L_No = '" & item & "'"

the problem was with quotes. :)

commented: Nice in solving yourself. +12

Indeed, integer has no problem returning data without the qoutation marks, strings does however. Nice in resolving your problem, some kudos... :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.