Avoid Navigation Pane to enlarge

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mihail
    Contributor
    • Apr 2011
    • 759

    Avoid Navigation Pane to enlarge

    Hy !
    I use following code to print out a report WITHOUT open it
    Code:
    Private Sub cmdPrintReportRAM_Click()
        DoCmd.SelectObject acReport, "ReportName", True
        DoCmd.PrintOut acPrintAll, , , , , 1
    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
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    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.

    Code:
    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.

    Comment

    • Mihail
      Contributor
      • Apr 2011
      • 759

      #3
      Thank you Seth ! Very much !
      This work properly.

      Comment

      Working...