So as mentioned, you copy the immediate window output into a new query in sql view. Then switch to datasheet view (I'd advise to not run action queries, use datasheet view instead). If it doesn't balk and shows a datasheet, the sql is good. Don't worry if the datasheet is blank. Usually, fields with "number" in the name are numbers, not text, so there's that. If it's a text field, keep the single quotes. If not, ditch them. There are ways to fix this error message if the aforementioned approaches don't work.
EDIT - might help to show more of the code before what you have. You can often resolve the problem by assigning the value of a form control to a variable and use the variable instead of the control reference in the sql. Otherwise, you might have to declare Parameter(s).
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.