Hello Accessers,
I am wondering what I am not writing properly in this code. It is for a user to type in a textbox where it will search for whatever is being typed in there- like a search box.
It will continue to say an error: "Run-Time error '13': Type Mismatch".
Code:
Private Sub btnFind_Click()
If (TxtFind & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[ACA Name2] = " * " & TxtFind & " * ""
If rs.NoMatch Then
MsgBox "Sorry, no such record '" & TxtFind & "' was found.", _
vbOKOnly + vbInformation
Else
Me.Recordset.Bookmark = rs.Bookmark
End If
rs.Close
TxtFind = Null
End Sub
The line that is red highlighted is where the debugger leads me to after attempting to execute the code.
Help....?
Thanks!