!!!!Urgent!!!!
Hi everyone,
i am new on the forum and i need some help for an access code.
I have to make a search engine by using a textbox, database, and command button.I MUST not use wizard.
I am using microsoft office access 2003
the reference is Microsoft DAO 3.5 Object library as references.
Here is the code:
__________________________________________________ _____________
Private Sub CmdSearch_Click()
Dim SearchResult As DAO.Recordset
Dim SucessfulResult
Logonname = Trim(Forms![FrmClient]![TxtSearch])
Set LoadTable = CurrentDb()
Set SearchResult = LoadTable.OpenRecordset("TblClient", dbOpenDynaset)
SearchResult.FindFirst "Client ID = '" & Logonname & "'"
If Form_FrmClient.TxtSearch = SearchResult.Fields("Client ID") Then
Found = True
MsgBox "ok"
Else
MsgBox "Record not found."
End If
End Sub
__________________________________________________ __________
I get thefollowing error:
"Run-time error '3077':
Syntax error (missing operator) in expression" and highlights the red line.
I tried several stuffs but the code still doesn't work.
Please help me!