print report help

  • Thread starter Scott_66701 via AccessMonster.com
  • Start date
S

Scott_66701 via AccessMonster.com

i set up a button to print multiple reports with one clip of the button. is
there a way to print the reports without the printer window popping up for
each report being printed?
 
R

ruralguy via AccessMonster.com

What version of Access are you using and on what OS? What code do you have
behind the button to print the reports?
 
N

niuginikiwi

Dim stDocName As String
stDocName = "rptName"
DoCmd.OpenReport stDocName, acPreview, "FilterName"
DoCmd.SelectObject acReport, stDocName
DoCmd.PrintOut acPrintAll, , , , 3
DoCmd.Close acReport, stDocName

If you have many printers installed on your PC, the above code inserted into
and onclick event of a button should print directly the default printer on
your PC instead of calling the Printer selection window.

Change the filter name (if you have any applied to report) and the report
name to suit what you have.

DoCmd.PrintOut acPrintAll, , , , 3 This line prints 3 copies but you can
change it to print any number you like.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top