How to Hide the Microsoft Access Navigation Pane Using VBA
Question details
The user wants to conceal the Navigation pane in Microsoft Access programmatically using VBA code.

- 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.
Ensure you have design access to the Microsoft Access database and that macros or VBA code execution are enabled in your Trust Center settings.
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.
Press ALT + F11 on your keyboard to open the Microsoft Visual Basic for Applications (VBA) editor.
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).
Type the following two lines of code: DoCmd.NavigateTo "acNavigationCategoryObjectType" followed by RunCommand acCmdWindowHide on the next line.
Save your VBA code, close the editor, and run the form to verify that the Navigation pane is successfully hidden.

Toggle the Navigation Pane Manually
If you do not strictly require a programmatic approach, you can easily toggle the pane's visibility using built-in keyboard shortcuts.
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. Download the software: Visit the official WPS Office website to download the free installation package.
- 2. Install and launch: Follow the simple on-screen instructions to install the suite and open the application.
- 3. Open your Office files: Drag and drop your existing Microsoft Office documents into WPS Office to continue working seamlessly without format loss.

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.




