I have the following filter statement to narrow down to the currently logged in user.
The Staff_name and Staff_supervisor fields have some names with ' in the name like O'Brien.Code:Forms![Incidents List].FilterOn = False Forms![Incidents List].RecordSource = "Qry_Incidents" Forms![Incidents List].Filter = "([staff_name] like '" & username & "' or [staff_supervisor] like '" & username & "')" Forms![Incidents List].FilterOn = True
I get a syntax error when it encounters one.
How can I effectively search a name like this?
Thank you,
Steve Hathaway


Reply With Quote
