SQL Error "Invalid SQL Statement" - Issue with Long Field Names after Possible Update? (Video Included)

Anonymous
2025-06-05T18:23:19+00:00

Hello everyone,

I'm experiencing an issue where some of my SQL queries, which I regularly used with standard tables, have suddenly stopped working overnight.

After conducting several tests, I suspect there might be a problem with Access itself. This error is occurring on different computers, which leads me to believe it could be a bug resulting from a recent update.

To better illustrate the problem, I've recorded a video demonstrating the issue. You can view it here:

https://youtu.be/0ejAL9qP9eY

Here are the steps I took that lead to the error:

  1. I created a query in Design View.
  2. I ran the query, and it worked perfectly.
  3. Then, I switched to SQL View. I clicked inside the SQL editor window and executed the query from the SQL View interface. (At this stage, before adding the field with a long name, it was still working correctly).
  4. Next, I went back to Design View and added a new field (which had a long name) to the query.
    • I first tried running the query directly from Design View again.
    • Then, I switched back to SQL View, clicked in the editor, and attempted to execute it. This time, when trying to run it from SQL View, I received the following error:

Invalid SQL Statement; expected 'DELETE','INSERT','PROCEDURE','SELECT' or 'UPDATE'

The main difference in the setup that resulted in the error was the length of the newly added field name. Based on my tests, this error only seems to occur when field names are long.

Could anyone offer any insights or help with this issue? Has anyone else experienced something similar, or are there any known workarounds?

Thanks in advance for your assistance!

My version: 2505 (build 18827.20128)

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2025-06-05T20:09:42+00:00

    Hi,

    Try to turn off the Monaco SQL editor which had this kind of problem again in recent beta versions:

    File - Options - Current Database - uncheck Enable Monaco SQL Editor

    Edit: You can also try to get the latest build 18827.20140 in the Current Channel from this week with

    File - Account - Update Options - Update Now

    to see if the problem still occurs.

    Servus
    Karl
    ****************
    Access Forever, News, DevCon
    Access-Entwickler-Konferenz AEK

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2025-06-17T16:42:24+00:00

    Hi,

    Today's update in the Current Channel contains a fix for this bug. For details see the Status section in the documenting AFo article.

    Servus
    Karl
    ****************
    Access Forever News DevCon
    Access-Entwickler-Konferenz AEK

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2025-06-12T15:03:15+00:00

    Hi,

    We were unable to reproduce long field names as a trigger. However, since we had a reproducible example with German umlauts (or any accented letter) as a trigger in another discussion, I wrote a bug documenting AFo article, which always will inform about the current status.

    Servus
    Karl
    ****************
    Access Forever, News, DevCon
    Access-Entwickler-Konferenz AEK

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2025-06-05T18:35:15+00:00

    That's just another bug.

    You can report it through the Feedback Portal: https://feedbackportal.microsoft.com/feedback/forum/818e3b49-e61b-ec11-b6e7-0022481f8472

    You have to expect such issues when you run the Current Update channel. No production machine should be running on the Current channel.

    You can rollback you build to a prior version while you wait for things to be addressed, or switch update channels,

    https://www.youtube.com/watch?v=JROodrU7CEQ

    Was this answer helpful?

    0 comments No comments