Intro to the Monaco SQL Editor with Maria Barnes
Learn about the new Monaco SQL Editor feature in Microsoft Access (an Access User Group talk with Maria Barnes).
Ever wished the SQL editor in Microsoft Access had modern features like syntax highlighting and IntelliSense?
Microsoft has integrated the Monaco editor framework (the same technology powering Visual Studio Code) into Access, bringing a host of powerful new features to SQL query development. In this Access User Group presentation, Maria Barnes demonstrates the capabilities, limitations, and practical considerations of this significant upgrade to Access's SQL editing experience. The Monaco SQL editor brings syntax highlighting, autocomplete, and improved formatting options while maintaining compatibility with existing queries.
Whether you're an experienced Access developer or just getting started with SQL queries, understanding these new capabilities will help you write and debug SQL more efficiently while maintaining compatibility with users on older versions.
Key Features
Syntax Highlighting
- Keywords shown in blue (SELECT, FROM, etc.)
- Operators in purple (INNER JOIN, LIKE, etc.)
- Functions in magenta (COUNT, MAX, etc.)
- Numbers and dates in green
- String values in red (when using single quotes)
- Different colors for nested brackets/parentheses
IntelliSense and Autocomplete
- Suggests available table names
- Shows field names within selected tables
- Includes form control names for parameters
- Supports table aliases (e.g., "Customer AS C")
- Autocompletes with TAB key
Enhanced Editing
- Command palette (F1 or right-click)
- Find/Replace (Ctrl+F/Ctrl+H)
- Line numbers
- Font size adjustment (Ctrl+/-)
- Change all occurrences feature
- Word highlighting
Using Comments
Current Capabilities
- Comments only supported at start of query
- Two supported syntaxes:
- Single line: --comment
- Multi-line: /* comment */
- Comments stored in new MSysSQLComments table
- Comments persist between SQL and Design views
Limitations
- Cannot add comments mid-query
- Attempting to save mid-query comments triggers error
- Comments table created on first comment usage
Implementation Details
Availability
- Currently in beta (Build 2411)
- Rolling out to Microsoft 365 subscribers
- Not included in Access 2024
- Expected in Current Channel by end of October
Requirements
- Database must be trusted
- Edge browser control required
- Optional feature that can be disabled
Settings
- Found under Current Database options
- Enabled by default for trusted databases
- Can be disabled per database
- Font/size controlled by Query Design settings
Known Issues and Limitations
Performance
- Noticeable lag when opening SQL view
- Delay when switching between Design/SQL views
- Related to Edge browser control usage
Formatting
- Indentation not saved
- Line breaks not preserved
- Query must be saved when switching to SQL view
- Special characters may display incorrectly
Compatibility
- Queries still work in older versions
- Reverts to classic editor if Monaco unavailable
- Pass-through queries supported
- Table/query drag-and-drop behaves unexpectedly
Recording
The full recording is available on YouTube:
Join Live!
Want to get even more out of these presentations? Join the live Access User Group events! The next upcoming events are listed on the AUG Event Calendar.
Attending live gives you the opportunity to:
- Interact directly with presenters during Q&A sessions
- Network with other Access developers
- Share your own experiences and challenges
- Get immediate answers to your specific questions
- Participate in group discussions
With multiple user groups across different time zones (and languages!), you're sure to find a meeting time that works for your schedule.
Acknowledgements
- Base cover image generated by FLUX-schnell
- Initial draft generated by Claude-3.5-Sonnet