Hide the shutter bar when I open a report using docmd.openreport using acviewpreview

needhelpfast569 used Ask the Experts™
Hide the shutter bar when I open a report using docmd.openreport using acviewpreview. I have upgraded to access 2007. When I opem a report in acviewpreview it shows the shutter bar on the left and shows tables etc which you do not want users in that area.

I need to open the report in preview mode which I do using acviewpreview but need to hide the shutter bar at the same time.

Samle command

docnd.openreport "finalotalsrpt", acviewpreview

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2009
Here are some procedures to hide or show the shutter bar (aka navigation pane).  You can call them as needed.  I usually assign them to hot keys in the AutoKeys macro, for convenience.
Public Function ShowNavPane()

   DoCmd.SelectObject objecttype:=acTable, indatabasewindow:=True
End Function

Public Function HideNavPane()

   DoCmd.RunCommand acCmdWindowHide

End Function

Open in new window

Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

If this is an end use app, then the Navigation pane should be hidden all the time.

You can turn the Navigation pane off when the DB opens by using:
Office Button-->Access Options-->Current Database-->Navigation
Un-check the "Show Navigation Pane" box.

You can always display the Navigation Pane whenever you like by pressing the F11 function Key.

Top Expert 2009
In many cases it is advisable to have the nav pane turned off in Access Options (as boag describes), and then you can turn it on when needed for development work using the functions I posted.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial