I'm trying to set up a simple error logging routine for my project. I call an error logging function, passing along the relevant variables, and the error logging function uses a DOCMD.RUNSQL INSERT INTO command to shove the data into the appropriate table.
The problem I'm running into occurs when the error description has single quotes in it. For example, a misspelled field gives the message:
Access can't find the field 'Initt" referred to in your expression.
Problem is, when I try to put single quotes around the whole message for the runsql command, it hits the single quotes around the field name and breaks. Is there a way around this?
I try not to let my ignorance prevent me from offering a strong opinion.
The problem I'm running into occurs when the error description has single quotes in it. For example, a misspelled field gives the message:
Access can't find the field 'Initt" referred to in your expression.
Problem is, when I try to put single quotes around the whole message for the runsql command, it hits the single quotes around the field name and breaks. Is there a way around this?
I try not to let my ignorance prevent me from offering a strong opinion.