MS Access VBA: Error -2147217900 (80040e14)

Jawahar on Expertsforge says this is an SQL syntax error where a keyword is used as a field name.

In Access, the app finds these keywords and quotes them before running the query. It's all done behind the scenes, but you can expose this feature through the query design tool.

Create a new query in design view. Bring up the SQL view. Paste your SQL in there. (You are probably already be at this point, testing your SQL and knowing it works.)

Go to the Design view again. Then, go to the SQL view. Access should have added some parentheses and square brackets. The square brackets are used to quote keywords.

You can then fix your code by quoting your keywords. (Use the backtick (`) instead of square brackets to be more normal.)