Report printing in doCmd

A

Amateur

I am printing a report using a command button:

DoCmd.OpenReport "billingcemetery", acViewNormal, acEdit

I would like that the report is printed twice - how can I change my command?
Thanks
Klaus
 
D

Dirk Goldgar

In
Amateur said:
I am printing a report using a command button:

DoCmd.OpenReport "billingcemetery", acViewNormal, acEdit

I would like that the report is printed twice - how can I change my
command? Thanks
Klaus

You can use the DoCmd.PrintOut method to do this. If you're willing to
have the database window displayed, you can do it without opening the
report first:

DoCmd.SelectObject acReport, "billingcemetery", True
Docmd.PrintOut Copies:=2

If you don't want the database window to be displayed, but are willing
to have the report be seen in print preview mode, you can do it like
this:

DoCmd.OpenReport "billingcemetery", acViewPreview
DoCmd.PrintOut Copies:=2
DoCmd.Close acReport, "billingcemetery"
 
Top