Hide Nav Pane with macro

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Hide Nav Pane with macro

Post by agibsonsw »

Hello again. Access 2007.
I know that I can set options to hide the Navigation Pane and the Ribbon, but is it possible to do these with a Macro?
I've looked through the list of Macro Actions but can't see these as options. Thanks again, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
Wendell
4StarLounger
Posts: 482
Joined: 24 Jan 2010, 15:02
Location: Colorado, USA

Re: Hide Nav Pane with macro

Post by Wendell »

Not as far as I know - even with VBA it is problematic, and causes some issues.
Wendell
You can't see the view if you don't climb the mountain!

User avatar
HansV
Administrator
Posts: 78530
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Hide Nav Pane with macro

Post by HansV »

Don't know about macros (I never use them), but here's the VBA:

To toggle the Navigation pane:

SendKeys "{F11}"

To hide the ribbon:

DoCmd.ShowToolBar "Ribbon",acToolBarNo

To show the ribbon again:

DoCmd.ShowToolBar "Ribbon",acToolBarYes

A better way to do this is to set the startup options for the database in Office button > Access Options > Current Database.
x296.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: Hide Nav Pane with macro

Post by agibsonsw »

Thank you. Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.