G
Guest
I have a form called frmBudget. This form has an unbound text box called
memBudgetNote for the user to enter notes, etc. When the user is finished I
store the entered note in a table called tblHistory. I use the following
code to store the note:
DoCmd.RunSQL "UPDATE tblHistory " & _
"Set BudgetNote = '" & Forms!frmBudget!memBudgetNote & " ';"
It works fine until the user enters an apostrophe, e.g. "It's in the file"
or "Bob's car". This produces the following error:
Run-time error '3075': Syntax error (missing operator) in query expression
"Bob's car ';'.
How can I fix this problem?
memBudgetNote for the user to enter notes, etc. When the user is finished I
store the entered note in a table called tblHistory. I use the following
code to store the note:
DoCmd.RunSQL "UPDATE tblHistory " & _
"Set BudgetNote = '" & Forms!frmBudget!memBudgetNote & " ';"
It works fine until the user enters an apostrophe, e.g. "It's in the file"
or "Bob's car". This produces the following error:
Run-time error '3075': Syntax error (missing operator) in query expression
"Bob's car ';'.
How can I fix this problem?