logo
search
Office Settings & Configuration

How to Hide the Access Ribbon After Closing a Query

Maira MehtabMaira Mehtab Sep 20, 2026 869 views

Question details

The user needs to keep the Microsoft Access Ribbon hidden after opening and subsequently closing a query in design mode.

Product
Microsoft Access
Device & OS
not provided
Scenario
A database is configured to hide interface elements, but users need to input dates via a query in design mode. Closing this query leaves the Ribbon exposed.
Observed behavior
Opening a query in design mode forces the previously hidden Ribbon to become visible, and it incorrectly remains visible after the query is closed.
Before you start

Ensure you have a backup of your Access database before modifying VBA code or form event properties to prevent accidental loss of interface accessibility.

Solution 1Recommended

Use the Form's Active Event Property to Re-hide the Ribbon

This solution triggers a VBA command automatically whenever your main form regains focus, ensuring the Ribbon is hidden immediately after closing the query.

By utilizing the 'On Activate' event of your primary form, you can instruct Access to re-apply your UI restrictions the moment the user returns from the query view. This is highly effective when design mode is strictly required for user inputs like dates.

1
Open Form in Design View

Right-click your main navigation form in the Access navigation pane and select 'Design View'.

2
Access the Property Sheet

Press F4 to open the Property Sheet. Ensure the selection type at the top of the Property Sheet is set to 'Form'.

3
Locate the On Activate Event

Navigate to the 'Event' tab in the Property Sheet, find the 'On Activate' property, and click the ellipsis (...) button to open the VBA editor.

4
Insert the Hide Ribbon Code

In the VBA window, input the command to hide the Ribbon, such as DoCmd.ShowToolbar "Ribbon", acToolbarNo. Save the module and test the form.

Event Trigger Confirmation: The Active event reliably fires every time the form is brought back to the forefront, making it a robust way to enforce UI rules.
Free Microsoft Office alternative

Looking for a Lightweight Office Suite? Try WPS Office

While Microsoft Access handles complex relational databases, for your everyday document processing, spreadsheet data analysis, and presentations, WPS Office offers a free, lightweight, and highly compatible alternative. Enjoy a familiar tabbed interface without heavy system requirements.

  1. 1. Download the Installer: Visit the official WPS Office website and click the Free Download button.
  2. 2. Install the Software: Run the downloaded executable file and follow the on-screen instructions.
  3. 3. Open Your Documents: Launch WPS Office to instantly view and edit your existing Office files seamlessly.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Lightweight installation ensures fast loading times and smooth performance.Familiar user interface requires no steep learning curve to switch.All-in-one suite covering Writer, Spreadsheets, Presentation, and PDF tools.
QA img-9

Frequently Asked Questions

Why does opening an Access query in design mode unhide the Ribbon?

Microsoft Access automatically exposes built-in interface elements like the Ribbon when entering design environments (such as Query Design or Form Design) so that users have access to necessary development tools and contextual tabs.

Can I hide the 'File' and 'Tell me what to do' tabs in Access using VBA?

Hiding core application-level elements like the File tab (Backstage view) usually requires implementing a custom XML Ribbon configuration rather than relying on simple DoCmd.ShowToolbar VBA commands.

Will Microsoft Word mail merge work with parameterized Access queries?

Word often struggles to natively recognize parameterized Access queries via standard OLE DB connections. Using dynamic SQL to populate a temporary static table in Access is a common and reliable workaround for mail merges.

What is the difference between DoCmd.ShowToolbar and customizing Ribbon XML?

DoCmd.ShowToolbar can quickly hide or show the entire default Ribbon at once, whereas customizing the Ribbon XML allows granular control over individual tabs, groups, and specific buttons for a fully tailored user experience.