Howlsta
Vampire Slayer
- Local time
- Today, 14:59
- Joined
- Jul 18, 2001
- Messages
- 180
I get this msg when i try to run the code below:
Object doesn't support this property or method
The error is caused by the following line.
I got it straight from a book so it should work. It doesn't seem to like me using Find:
Me.Recordset.Find "LastName = " & strName, Start:=1
Private Sub cmdFind_Click()
Dim strName As String
Dim varBookmark As Variant
varBookmark = Me.Recordset.Bookmark
strName = InputBox("Enter Surname")
Me.Recordset.Find "LastName = " & strName, Start:=1
If Me.Recordset.EOF Then
MsgBox "Surname " & strName & " Not Found!!"
Me.Recordset.Bookmark = varBookmark
End If
End Sub
Object doesn't support this property or method
The error is caused by the following line.
I got it straight from a book so it should work. It doesn't seem to like me using Find:
Me.Recordset.Find "LastName = " & strName, Start:=1
Private Sub cmdFind_Click()
Dim strName As String
Dim varBookmark As Variant
varBookmark = Me.Recordset.Bookmark
strName = InputBox("Enter Surname")
Me.Recordset.Find "LastName = " & strName, Start:=1
If Me.Recordset.EOF Then
MsgBox "Surname " & strName & " Not Found!!"
Me.Recordset.Bookmark = varBookmark
End If
End Sub