G
Guest
Hi all,
I have a form with a search box that lists the full names of Employees: -
Private Sub Combo66_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[FullName]= '" & Me![Combo66] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
This works fine when choosing 'Joe Bloggs' as it correctly returns the
correct record. However, I noticed this morning that choosing 'Geoffrey
O'Brien' results in the following error: -
Run-time error '3077':
Syntax error (missing operator) in expression.
It must be picking up on the ' (apostrophe) in his last name! Is there a way
around this?
Thanks.
I have a form with a search box that lists the full names of Employees: -
Private Sub Combo66_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[FullName]= '" & Me![Combo66] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
This works fine when choosing 'Joe Bloggs' as it correctly returns the
correct record. However, I noticed this morning that choosing 'Geoffrey
O'Brien' results in the following error: -
Run-time error '3077':
Syntax error (missing operator) in expression.
It must be picking up on the ' (apostrophe) in his last name! Is there a way
around this?
Thanks.