By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,490 Members | 1,774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,490 IT Pros & Developers. It's quick & easy.

Avoid Navigation Pane to enlarge

100+
P: 759
Hy !
I use following code to print out a report WITHOUT open it
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdPrintReportRAM_Click()
  2.     DoCmd.SelectObject acReport, "ReportName", True
  3.     DoCmd.PrintOut acPrintAll, , , , , 1
  4. End Sub
My trouble become with line 2.
This cause Navigation Pane window to enlarge (open).

Is here any way to avoid this ?
I wish NOT to deny user access to Navigation Pane.

ACCESS 2007
Nov 12 '11 #1

✓ answered by Seth Schrock

I'm not sure if this will do what you are looking for, but you could try another approach to print the report without opening it. If you use the following code, it will print out the report to the computer's default printer without opening it.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport("ReportName")
Because the default view for the this command is acViewNormal, you will get the proper results without specifying the view. And since you aren't selecting the report, it won't cause the navigation pane to open.

I believe that this will work for you.

Share this Question
Share on Google+
2 Replies


Seth Schrock
Expert 2.5K+
P: 2,951
I'm not sure if this will do what you are looking for, but you could try another approach to print the report without opening it. If you use the following code, it will print out the report to the computer's default printer without opening it.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport("ReportName")
Because the default view for the this command is acViewNormal, you will get the proper results without specifying the view. And since you aren't selecting the report, it won't cause the navigation pane to open.

I believe that this will work for you.
Nov 12 '11 #2

100+
P: 759
Thank you Seth ! Very much !
This work properly.
Nov 13 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.