How to hide the Navigation Pane in Microsoft Access
Requirement: Visual Basic Knowledge
File to download: None
Related Articles: Macros vs Visual Basic Modules, Using Switchboard for easy navigation, Hide Visual Basic Modules by saving your Access Files in MDE or ACCDE file format
If you have a Switchboard installed as the navigation tool in your Access file, you can choose to hide the navigation pane so the users can not do anything to the tables, queries, forms, reports, macros, and modules. Please note that it is better to save your file in MDE or ACCDE format, so the users cannot crack the VB codes and make the navigation pane re-appear again.
Before you write codes to hide the navigation pane, please make sure that the Switchboard will automatically pop up once the Access file is opened. Otherwise, the users will not have anything to navigate.
Step 1: Click the Office button and then choose “Access Options”
Step 2: Click the “Current Database” and then make sure the “Switchboard” is listed under the ‘Display Form:”.
Now you can follow these steps to hide the navigation pane. Open your Visual Basic Editor by clicking the “Database Tools” tab on the ribbon, and then click the “Visual Basic” icon.
In the Visual Basic editor screen, double click the “Form_Switchboard”, and add the “DoCmd.RunCommand acCmdWindowHide” at the bottom of the subroutine (VB module). Please see below the entire code of the subroutine. When the Switchboard form is automatically opened when the Access file is opened, the navigation pane will be hidden automatically.
Private Sub Form_Open(Cancel As Integer)
‘ Minimize the database window and initialize the form.
DoCmd.SelectObject acForm, “Switchboard”, True
DoCmd.Minimize
‘ Move to the switchboard page that is marked as the default.
Me.Filter = “[ItemNumber] = 0 AND [Argument] = ‘Default’ “
Me.FilterOn = True
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
End Sub
Now you don’t the navigation pane any more.