Hide Navigation Pane in Access 2010

TimTDP

Registered User.
Local time
Today, 12:13
Joined
Oct 24, 2008
Messages
213
In Access 2010, pressing F11 will either maximise / minimise the navigation pane.
Is there a method to hide it completly?

I use this to show / hide the toolbar:

If pubShowRibbonBar = False Then
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Else
DoCmd.ShowToolbar "Ribbon", acToolbarYes
[FONT=&quot]End If

[/FONT]pubShowRibbonBar is set when the user logs in.
[FONT=&quot]
I need somthing like this to completly hide the navigation pane.

Many thanks
[/FONT]
 
Hi,

You can go to the settings menu and do it from there. Not too sure if you can do it with code.
 
I use this code to completely hide the nav pane:


DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide

And this to un-hide it:


DoCmd.SelectObject acTable, "MSysObjects", True
 
where to write the code? that means which event or which form?
 
where to write the code? that means which event or which form?

I have it behind the form that functions as the main menu for my app, but it properly belongs in a class module, in my opinion.
 
abzalali,

If you want to hide the nav pane from the users when they open the application, put it in the AutoExec macro. I do this for just about everything I create.

First, create an AutoExec() function in your Module1.
In this function, you put all the VBA code that you want to happen when a user starts your application. Things like hide the ribbon & nav pane, make temp tables, and open the form you want them to see first.

Second, you create a macro named "AutoExec". The only action you need in this macro is RunCode and the Function Name is AutoExec (). If your AutoExec function takes very long to run, a good option would be to create a "splash screen" which is a form that you can open to entertain the users for the few seconds that they have to wait for your application to get set up with temp tables and startup queries and such. For this, you would put the OpenForm action in your AutoExec macro ahead of the Run Code.

This is starting to go off topic, but the point is, this is the place to put the VBA code to hide the navigation pane, if your objective is to keep it away from the users all the time.
 

Users who are viewing this thread

Back
Top Bottom