logo
search
Office Settings & Configuration

How to Hide the Microsoft Access Navigation Pane Using VBA

Camila MilosovichCamila Milosovich Oct 22, 2026 869 views

Question details

The user wants to conceal the Navigation pane in Microsoft Access programmatically using VBA code.

How to Hide the Microsoft Access Navigation Pane Using VBA
Product
Microsoft Access
Device & OS
not provided
Scenario
Developing or customizing a Microsoft Access database interface where the default Navigation pane needs to be hidden from end-users.
Observed behavior
The user needs the specific VBA commands to hide the Navigation pane, similar to using the DoCmd.ShowToolbar method for the ribbon.
Before you start

Ensure you have design access to the Microsoft Access database and that macros or VBA code execution are enabled in your Trust Center settings.

Solution 1Recommended

Hide the Navigation Pane Programmatically via VBA

Use specific DoCmd and RunCommand methods within your VBA module to automate hiding the Navigation pane when the database or form loads.

By utilizing the DoCmd.NavigateTo and RunCommand methods, you can seamlessly integrate the action of hiding the Navigation pane into your database startup routines.

1
Open the VBA Editor

Press ALT + F11 on your keyboard to open the Microsoft Visual Basic for Applications (VBA) editor.

2
Locate the target event

In the Project Explorer, double-click the form or module where you want the code to execute (for example, the Form_Load event of your main startup form).

3
Insert the VBA commands

Type the following two lines of code: DoCmd.NavigateTo "acNavigationCategoryObjectType" followed by RunCommand acCmdWindowHide on the next line.

4
Save and test

Save your VBA code, close the editor, and run the form to verify that the Navigation pane is successfully hidden.

Hide the Navigation Pane Programmatically via VBA
Automate on Startup: For best results, place this code in an AutoExec macro or your default startup form's On Load event to ensure the pane is hidden immediately when users open the database.
Free Microsoft Office alternative

Boost Your Productivity with WPS Office

While Microsoft Access is tailored for complex database building, WPS Office provides a free, lightweight, and comprehensive suite for all your daily document, spreadsheet, and presentation needs. It ensures seamless transition with a familiar interface and robust format compatibility.

  1. 1. Download the software: Visit the official WPS Office website to download the free installation package.
  2. 2. Install and launch: Follow the simple on-screen instructions to install the suite and open the application.
  3. 3. Open your Office files: Drag and drop your existing Microsoft Office documents into WPS Office to continue working seamlessly without format loss.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Lightweight architecture ensuring fast loading times and minimal resource usage.Familiar, intuitive user interface for a seamless migration from Microsoft Office.Built-in PDF editing and conversion tools at no extra cost.
microsoft office alternative - wps office

Frequently Asked Questions

How do I unhide the Navigation pane using VBA?

To unhide the Navigation pane programmatically, you can select the object using VBA and then use the RunCommand acCmdWindowUnhide command, or simply use the SelectObject method to bring the pane back into focus.

Can I prevent users from using F11 to show the Navigation pane?

Yes. You can disable the F11 shortcut by navigating to File > Options > Current Database, and unchecking the 'Use Access Special Keys' option.

Why isn't my VBA code hiding the Navigation pane on startup?

Ensure that the macro or VBA module containing your code is actively triggered upon startup, such as being named 'AutoExec', and verify that you have enabled macros in the Access Trust Center settings.