Office Settings & Configuration

Fix Microsoft Access Form Buttons That Cannot Show or Hide the Ribbon

Anum MushtaqAnum Mushtaq Nov 18, 2026 869 views

Question details

Restore Microsoft Access form buttons that show and hide the Ribbon.

Fix Access Form Buttons That Do Not Show or Hide the Ribbon
Product
Microsoft Access
Device & OS
Windows; version not provided
Scenario
A user wants form buttons to control the Access Ribbon after a Windows or Office upgrade.
Observed behavior
Buttons that previously controlled the Ribbon no longer work, and attempts to use toolbar constants as Boolean conditions fail.
Before you start

Open the affected database in Microsoft Access and make sure you can edit the form and its VBA event procedures. If Access displays a security warning, enable trusted content only if you trust the database.

Solution 1Recommended

Enable Built-in Toolbars and Test Separate Ribbon Buttons

Use this method to check the database setting and isolate the show and hide commands before attempting a toggle.

The acToolbarYes and acToolbarNo constants are arguments to DoCmd.ShowToolbar, not Boolean tests for the Ribbon's current visibility.

1
Enable built-in toolbars

In Access, open File > Options > Current Database. Under Ribbon and Toolbar Options, select Allow Built-in Toolbars, then click OK.

2
Reopen the database

Close and reopen the database so the startup setting can take effect.

3
Add a Show Ribbon button

Open the form in Design View and add a command button. In its Property Sheet, set On Click to Event Procedure, open the code builder, and place this line inside the button's click procedure: DoCmd.ShowToolbar "Ribbon", acToolbarYes

4
Add a Hide Ribbon button

Add a second command button in Design View and create its On Click event procedure. Place this line inside that procedure: DoCmd.ShowToolbar "Ribbon", acToolbarNo

5
Test each button

Save the form, switch to Form View, and click each button separately. Do not use an If statement with acToolbarYes or acToolbarNo as a condition for this test.

Enable Built-in Toolbars and Test Separate Ribbon Buttons
VBA alternative for the database setting: If the AllowBuiltInToolbars database property already exists, a button's click procedure can set it with CurrentDb.Properties("AllowBuiltInToolbars") = -1. Close and reopen the database if needed before testing the Ribbon buttons.
Free Microsoft Office alternative

Use WPS Office for Everyday Office Files

WPS Office is a free, lightweight alternative with a familiar interface for working with common Office files. It supports migration of documents, spreadsheets, and presentations, but it does not run Access forms or fix Access Ribbon commands.

Work with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar ribbon-style interface for everyday editingOpen common Office files when moving everyday work to WPS OfficeUse a free, lightweight suite for documents, spreadsheets, and presentations
microsoft office alternative - wps office

Frequently Asked Questions

Where can I enable built-in toolbars in Access?

Open File > Options > Current Database, select Allow Built-in Toolbars under Ribbon and Toolbar Options, and click OK. Close and reopen the database to apply the startup setting.

Which VBA commands show and hide the Access Ribbon?

Use DoCmd.ShowToolbar "Ribbon", acToolbarYes to show it and DoCmd.ShowToolbar "Ribbon", acToolbarNo to hide it. Put each command in a form button's On Click event procedure.

Can I use acToolbarYes in an If statement to check whether the Ribbon is visible?

No. acToolbarYes specifies the action for DoCmd.ShowToolbar; it is not a Boolean visibility test. Test separate show and hide buttons first.

Why does setting AllowBuiltInToolbars in VBA produce a property-not-found error?

The database property may not exist. Instead, check Allow Built-in Toolbars under File > Options > Current Database, then reopen the database.