Run-time error '3001', this isn't Sparta

Salient

Registered User.
Local time
Today, 20:34
Joined
Aug 14, 2007
Messages
63
vb6 connecting via ADO to a DNS reference to a MS Access 2003 database

Code:
Private Sub cboCategory_Click()
    '
    With pobjADOtable
        .MoveFirst
        .Find ("CategoryName=" & cboCategory.Text)
        If .EOF Then
            MsgText = "Error on Database Table" & vbCrLf _
                & "Trying Screaming for help
            MsgBox MsgText, vbExclamation, MsgHeader
            Exit Sub
        Else
            LoadText
        End If
    End With
    '
End Sub

Am getting the error on the .find clause

Arguements are of the wrong type, are piut of acceptance range, or are in conflict with one another

:( Anyone know what MS are trying to tell me there :confused:
 
Try this code:
Code:
Private Sub cboCategory_Click()
    '
    With pobjADOtable
        .MoveFirst
[COLOR="SeaGreen"]'        .Find ("CategoryName=" & cboCategory.Text)[/COLOR]
        [COLOR="Red"].Find ("CategoryName='" & cboCategory.Text & "'")[/COLOR]
        If .EOF Then
            MsgText = "Error on Database Table" & vbCrLf _
                & "Trying Screaming for help[B][COLOR="Red"]"[/COLOR][/B]
            MsgBox MsgText, vbExclamation, MsgHeader
            Exit Sub
        Else
            LoadText
        End If
    End With
    '
End Sub
 
Thanks RG, it's now working like a brought one :)

Actually haven't touched vb for five or so years, and am well out of touch with it at the moment. Might help if I wasn't currently coding in three separate languages :(
 

Users who are viewing this thread

Back
Top Bottom