Hide Navigation Pane in Access 2010 (1 Viewer)

TimTDP

Registered User.
Local time
Today, 23:34
Joined
Oct 24, 2008
Messages
210
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]
 

r.harrison

It'll be fine (I think!)
Local time
Today, 21:34
Joined
Oct 4, 2011
Messages
134
Hi,

You can go to the settings menu and do it from there. Not too sure if you can do it with code.
 

bparkinson

Registered User.
Local time
Today, 14:34
Joined
Nov 13, 2010
Messages
158
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
 

abzalali

Registered User.
Local time
Tomorrow, 03:34
Joined
Dec 12, 2012
Messages
118
where to write the code? that means which event or which form?
 

bparkinson

Registered User.
Local time
Today, 14:34
Joined
Nov 13, 2010
Messages
158
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.
 

MarvinM

Registered User.
Local time
Today, 13:34
Joined
Nov 26, 2013
Messages
64
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

Top Bottom