View Full Version : Object doesn't support this property or method


Howlsta
08-31-2001, 04:16 AM
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

Chris RR
08-31-2001, 11:17 AM
Are you using recordsets in the rest of your code?

P.S. Code straight from a book, any book, rarely works without some tinkering *sigh*

Howlsta
08-31-2001, 11:23 AM
I can't be arsed with this any more, there's simpler ways of finding records so it's not that important. Thanks anyway. I tried using recordsets in the load event too, but that was pissing me off too.

Rich