I have a database that has several forms. One of the forms is called "ABC". On this form there is a button under which there is a macro printing another form called "DEF". The "DEF" form does not open - after clicking on the button a window pops up where I can choose whether I should print with a default printer or maybe I want to export the form to PDF. Generally, what I do not choose, despite the blockade of tables and other things on the left side pop up tables for me (it's a navigation window) and the user could bury in the settings. How to block it?
1 Answers
1
votes
If the report is not yet open,then
docmd.OpenReport "rptName",acViewPreview
Will NOT show the nav pane. However, after you opened a report, and if you use a custom print button (as opposed to a MUCH better approach of a custom ribbon), then make sure the LAST parameter of the select object is set = FALSE
eg:
DoCmd.SelectObject acReport, "rptName", False
DoCmd.PrintOut Copies:=intCopies
DoCmd.Close acReport, "rptName"
So, as a general rule, the nav pane should not be showing, but using "false" in the above select object code should keep the nav pane hidden.
I would setup a Ribbon (a2007 or later) and thus you would not need the custom print code behind some button.