Here's an interesting problem I just ran into for the first time. I have the following query code on my form (frmXacn) to pull up training information when an employees name is entered...
Set rsTrng = db.OpenRecordset("SELECT EName, Course, Passed FROM qryTraining WHERE ([EName] = '" & Forms!frmXacn!txtXacnEmpName & "');")
One of the employees has an apostrophe in his last name (D'Ano, Mike), so I get the following error when his name is put through the query...
Run-time error '3075':
Syntax error (missing operator) in query expression
'On TrackName = 'D'Ano, Mike".
I understand why the code thinks there is an error, but is there a way to get around it for a case like this?
Thanks again for your help.