G
Guest
Hi guys,
Can you tell me why I'm getting an error message saying "Syntax error
(missing operator) in expression" ?
Dim rst As Recordset
Dim Criteria As String
Dim searchvalue As String
searchvalue = InputBox("Please enter all or part of the candidate's Surname
in the box below.", "Search by Surname")
If searchvalue = "" Then
Exit Sub
End If
Criteria = "SURNAME Like *" & searchvalue & "*"
Set rst = Me.RecordsetClone
rst.FindFirst Criteria
If rst.NoMatch Then
MsgBox "Sorry, no match found. Try again."
Else
Me.Bookmark = rst.Bookmark
Me.txtSurname.SetFocus
End If
Exit_cmdFind_Click:
Exit Sub
Err_cmdFind_Click:
MsgBox Err.Description
Resume Exit_cmdFind_Click
Thanks very much for any help you can give.
Regards,
Lee
Can you tell me why I'm getting an error message saying "Syntax error
(missing operator) in expression" ?
Dim rst As Recordset
Dim Criteria As String
Dim searchvalue As String
searchvalue = InputBox("Please enter all or part of the candidate's Surname
in the box below.", "Search by Surname")
If searchvalue = "" Then
Exit Sub
End If
Criteria = "SURNAME Like *" & searchvalue & "*"
Set rst = Me.RecordsetClone
rst.FindFirst Criteria
If rst.NoMatch Then
MsgBox "Sorry, no match found. Try again."
Else
Me.Bookmark = rst.Bookmark
Me.txtSurname.SetFocus
End If
Exit_cmdFind_Click:
Exit Sub
Err_cmdFind_Click:
MsgBox Err.Description
Resume Exit_cmdFind_Click
Thanks very much for any help you can give.
Regards,
Lee