Blog Post

Access Blog
2 MIN READ

Try the new modern SQL editor in Access!

lindalu-MSFT's avatar
lindalu-MSFT
Icon for Microsoft rankMicrosoft
Nov 08, 2024

The A-team is thrilled to announce another feature release! We've updated the monochrome editor to the Monaco SQL editor available to all in the current channel. This blog post highlights some of the features of the new editor.

In October 2024, we added an update to the SQL editor and some key modern features. The new editor is designed to align with other Microsoft IDEs like SSMS, Visual Studio, and VS Code, leveraging the same powerful UI library behind Visual Studio Code. 

The Monaco editor supports essential features such as syntax highlighting, line numbering, light/dark themes, and more. Additional capabilities include auto-completion, comment handling, and formatting support. Built using a JavaScript framework and powered by the latest Edge browser technology, the editor works seamlessly offline. 

Enable/Disable the Monaco editor in your current database

The Monaco SQL Editor can be toggled on/off. Note that the Monaco editor is only available in Access as part of Microsoft 365. Users of all other versions, including Access 2024, will continue to see the existing monochrome editor.

This setting is enabled by default for all databases and applies at the database level. For security reasons, the Monaco editor is only available on trusted databases; untrusted databases will use the previous monochrome editor.

  1. Go to File Options Current Database.
  2. Select or clear the Enable Monaco SQL Editor checkbox.

Control editor font style and size

  1. Go to File Options Object Designers.
  2. In the Query design section, choose the font style and font size. The default is Segoe UI 8. Note that while in the design editor, the font size may be increased using Ctrl + or decreased using Ctrl –.

Comment support

In Access queries, comments are supported only at the beginning of the query text, whereas in remote SQL queries, you can add comments anywhere. Comments appear in green.

Autocompletion support

Rich autocompletion support enhances the user experience by suggesting SQL keywords, functions, table and column names dynamically as you type. Additionally, it can reference form elements to streamline query writing, making it more intuitive and efficient for developers. 

Rich keyboard shortcut support

Many familiar keyboard editing shortcuts from VS Code are now available in the Monaco SQL editor, providing a consistent and efficient workflow for developers. All available commands based on your current context are accessed using the F1 key, which opens a command palette like the one in VS Code, enabling quick navigation and command execution. 

 

More resources

For more information about the new Monaco SQL editor, see Microsoft MVP Colin Riddington's detailed article New Monaco SQL Editor on his Access developer blog.

Published Nov 08, 2024
Version 1.0
  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

    Access team should also update SQL editor windows to remain text as is we save. Means, we format SQL syntax each field name in one line to make it easier to read and understand. But, after saving and reopening to SQL view it mix-up all filed in one line which is very clumsy.

    SELECT    tblManufacture.POS, 
                    tblManufacture.WCH, 
                    Sum(tblManufacture.ManufactureQty) AS Total, 
                    Max(tblManufacture.MDateTime) AS [Last Edit]
    FROM tblManufacture
    GROUP BY tblManufacture.POS, tblManufacture.WCH
    HAVING (((tblManufacture.WCH)=15));

    Above is a simple SQL statement I edit in SQL view and save it then close the editor window. When I reopen the query in SQL view then it shows like-

    SELECT tblManufacture.POS, tblManufacture.WCH, Sum(tblManufacture.ManufactureQty) AS Total, Max(tblManufacture.MDateTime) AS [Last Edit]
    FROM tblManufacture
    GROUP BY tblManufacture.POS, tblManufacture.WCH
    HAVING (((tblManufacture.WCH)=15));

    Access team should improve so that I can see same as before as I save the query.

  • SebastienB's avatar
    SebastienB
    Copper Contributor

    The new editor is eyecandy only. It doesn't support subqueries. For example,  when switching this SQL query "SELECT * FROM (SELECT PrimaryKeyField, Field1, Field2 FROM Table) AS ReqTable" in design mode, you will see the subquery "ReqTable" but you won't see the fields in it (PrimaryKeyField, Field1, Field2). So it's impossible to create a relation on "ReqTable.PrimaryKeyField" with another table from there... Very disappointing and useless for me...

      • Harun24HR's avatar
        Harun24HR
        Bronze Contributor

        The provided link is very helpful. Also removing the line break fixes switching from SQL to design view problem. Hope Microsoft team will fix all the issues permanently in near future.

  • LeeWHill's avatar
    LeeWHill
    Copper Contributor

    I have been using Access for nearly 30 years, and still find it incredibly useful, both personally and professionally. The thing that has most let it down for all that time is the SQL query editor, which was at best, basic, and at worst, antediluvian. As a database specialist, I prefer to write queries in SQL rather than using the designer, but it was incredibly frustrating in the old editor. I couldn't quite believe it when colours and intellisense suggestions just started appearing in my Access SQL last week! This is a MASSIVE improvement, especially the ability to change font style and size (proportional fonts in a code editor are just wrong!) I may well comment again when I've been using it for a while.

  • fmsap1968's avatar
    fmsap1968
    Copper Contributor

    "Access team should improve so that I can see same as before as I save the query."

    Can it be resolved?

    • George_Hepworth's avatar
      George_Hepworth
      Silver Contributor

      Microsoft is constantly working on issues like this. There's no public timetable, but there is constant feedback going to the Access team about the lack of enthusiasm for the current status of the Monaco SQL Editor in Access.

    • Harun24HR's avatar
      Harun24HR
      Bronze Contributor

      I am expecting same. MS team should more and more improvement.

  • tywonek's avatar
    tywonek
    Copper Contributor

    I think you have surprised a lot of people:) Super. I'm glad Access is still alive.

  • fmsap1968's avatar
    fmsap1968
    Copper Contributor

    I think you have surprised a lot of people:) 

    The best programming action of the year!!

  • fmsap1968's avatar
    fmsap1968
    Copper Contributor

    Incredible !! the most! Expected and accomplished. Thank you very much