I have a form that uses the code listed below on the after update of a combo box to search for the selected company name. However, if the company name contains an apostrophe (Example: Dave's Trucking, George's Service Center) the seasrch fails and generates a VBA Error statement Run-Time Error 3077, Syntax error (missing operator )in expression.
Any suggestions as to how to get around this problem other than removing the apostrophe out of each name (not practical).
After Update event on company (combo25) search field.
Set rs = Me.Recordset.Clone
rs.FindFirst "[COMPANY] = '" & Me![Combo25] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Any suggestions on how to handle this problem.