I am using Access 2000
..
I have a table called tblMembers with two fields
MemID (Primary key indexed no duplicates)
MemName (Thirty character text field)
and I have a text box (txtLookFor)
I want to find the record in the table that matches the number entered in
the text box.
If there is no match then a simple msgbox warning is sufficient.
I get a "Type Mismatch Error" on the Set rs = Me.Recordset statement.
Can anyone tell me what is wrong.
Here is the entire code.
Thanks
Private Sub txtLookFor_Afte rUpdate(Cancel As Integer)
Dim rs As Recordset
Set rs = Me.Recordset
rs.Seek txtLookFor, adSeekFirstEQ
If rs.EOF Then
MsgBox ("Not Found")
Else
MsgBox ("found")
End If
End Sub
..
I have a table called tblMembers with two fields
MemID (Primary key indexed no duplicates)
MemName (Thirty character text field)
and I have a text box (txtLookFor)
I want to find the record in the table that matches the number entered in
the text box.
If there is no match then a simple msgbox warning is sufficient.
I get a "Type Mismatch Error" on the Set rs = Me.Recordset statement.
Can anyone tell me what is wrong.
Here is the entire code.
Thanks
Private Sub txtLookFor_Afte rUpdate(Cancel As Integer)
Dim rs As Recordset
Set rs = Me.Recordset
rs.Seek txtLookFor, adSeekFirstEQ
If rs.EOF Then
MsgBox ("Not Found")
Else
MsgBox ("found")
End If
End Sub
Comment