Hiding The Nav Pane - Quick Question

alphaomegastephan

Registered User.
Local time
Today, 15:42
Joined
Mar 3, 2015
Messages
13
Hi,
Hopefully this is a quick easy question for you that someone might know the answer to.
I am using Access 2013 and have disabled the nav pane in the 'File' 'options' 'Current Database' 'Display Navigation Pane' option and all is working well,
however, i have a report that runs on the database and when you go to print preview it, it also opens the navigation pane which the user then has to minimize.
Is there a way to stop it opening when the print preview is 'activated'? :confused:
Thanks :)
(As attached Image)
 

Attachments

  • Access Nav Query.jpg
    Access Nav Query.jpg
    104.8 KB · Views: 137
Shooting from the hip here...is the pop-up and modal properties set to "yes"?
 
Hi NauticalGent,
They weren't,
So tried it and the same thing happened, only the report arreared as a popup rather than a tab.
 

Attachments

  • Access Nav Query img 2.jpg
    Access Nav Query img 2.jpg
    89.3 KB · Views: 129
We found that if you access something in the Nav Pane in code it unhides it. In our case we were deleting a link table and creating a linked table via DoCmd.TransferSpreadsheet. The only thing we found we could do was to hide it again. We used
Code:
 DoCmd.SelectObject acTable, , True
 DoCmd.RunCommand acCmdWindowHide

You could try putting that in the Report Open or Load event. It's not idea as you still see a flash of the Nav Pane.
 
As I said, it was a spitball. Steve's suggestion is propably the only way to do it.
 
NauticalGent: No worries, the idea was worth a try!
Steve: Like you said, not the most elegant solution, but it works so i'm happy :)

Thank You very much :)
Stephan
 
On the other hand maybe this could be prevented by fixing whatever is causing it to happen. I don't think just going to print preview by itself would cause this. Is there an event code in the report? If so could you post it?
 
So, On the report itself, there is only the code you have just given me.
To open the report is a button and the code on the button is:
On Click-
'Select object:
- Object type: Report
- Object Name: Print Report
-In Database Window: Yes'
'Run MenuCommand:
-Command: Print Preview'

Created using the macro creator as an event.

If that makes sense!
 
So, On the report itself, there is only the code you have just given me.
To open the report is a button and the code on the button is:
On Click-
'Select object:
- Object type: Report
- Object Name: Print Report
-In Database Window: Yes'
'Run MenuCommand:
-Command: Print Preview'

Created using the macro creator as an event.

If that makes sense!

I'd try using OpenReport in the macro instead of SelectObject. I suspect the SelectObject is causing this problem.
 
Just got back to work and had a chance to look at this,
I didn't think to look there!
I changed it to open report instead of select object and it worked fine.
Thank You :)
 

Users who are viewing this thread

Back
Top Bottom