Minimize Navigation Pane on Autoexec?

In Access 2010 - how do you make a database have the lefthand Navigation Pane minimized on load of the applicatoin?

I assume I could do this in the autoexec but unsure how to.  Please advise.
gcgcitAsked:
Who is Participating?
 
Jim Dettman (Microsoft MVP/ EE MVE)Connect With a Mentor President / OwnerCommented:
 That was a VBA statement to be used in code.

  If your just going to run it in the Autoexec macro, you want the RunMenuCommand action with the command WindowHide.

Jim.
0
 
Rey Obrero (Capricorn1)Commented:
you can also set to hide the NP from File > Options > current database
0
 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:

 Do a DoCmd.RunCommand acCmdWindowHide at startup or in the autoexec macro (probably a better place as you must issue the command before anything becomes visible).

Jim.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:

 BTW, a F11 with sendkeys from code will hide/unhide the window as well.

Jim.
0
 
gcgcitAuthor Commented:
JDettman - on the autoexec I could only find "RunCode" not "RunCommand" I got this error:

Micros Access cannot find the name 'acCmdWindowHide' you entered in th eexpression.

See screenshot of my autoexec macro
ee-autoexec.JPG
0
 
gcgcitAuthor Commented:
Worked thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.