A
Asif
Hello
I have a suppliers form which I have a button which
relates to the following code
Private Sub cmdFindSupplier_Click()
Dim rst As ADODB.Recordset
Dim strCriteria As String
strCriteria = "[ContactName] Like '*" & InputBox
("Enter the " _
& "first few letters of the name to find") & "*'"
Set rst = Me.RecordsetClone
rst.Find strCriteria
If rst.NoMatch Then
MsgBox "No entry found.", vbInformation
Else
Me.Bookmark = rst.Bookmark
End If
Set rst = Nothing
End Sub
When I click on the button it comes with the following
error and the If rst.NoMatch Then is highlighted
Compile Error:
Method or data member not found.
I think the error comes because it relates to a DAO
reference, but I am using an adp with ADODB reference.
What can I use instead on NoMatch that relates to that
reference?.
Kind Regards
Asif
I have a suppliers form which I have a button which
relates to the following code
Private Sub cmdFindSupplier_Click()
Dim rst As ADODB.Recordset
Dim strCriteria As String
strCriteria = "[ContactName] Like '*" & InputBox
("Enter the " _
& "first few letters of the name to find") & "*'"
Set rst = Me.RecordsetClone
rst.Find strCriteria
If rst.NoMatch Then
MsgBox "No entry found.", vbInformation
Else
Me.Bookmark = rst.Bookmark
End If
Set rst = Nothing
End Sub
When I click on the button it comes with the following
error and the If rst.NoMatch Then is highlighted
Compile Error:
Method or data member not found.
I think the error comes because it relates to a DAO
reference, but I am using an adp with ADODB reference.
What can I use instead on NoMatch that relates to that
reference?.
Kind Regards
Asif