C
Christine Desmuke
Hello:
I'm using Access 2000 SR-1 on WinXP, and trying to code a button on a
form to print multiple copies of a particular report. The report
itself works fine, and I can print a single copy using
DoCmd.OpenReport "rptDeedofGift", acViewNormal. To print multiple
copies, I think I need to use DoCmd.PrintOut, but I can't get it to
work.
The command sequence :
DoCmd.OpenReport "rptDeedofGift", acViewPreview
DoCmd.PrintOut acPrintAll, , , , 2, -1
prints two copies of the _form_ on which the button is located.
Then I tried:
DoCmd.SelectObject acReport, "rptDeedofGift", True
DoCmd.PrintOut acPrintAll, , , , 2, -1
with the same result.
Somehow, focus is staying with the form rather than shifting to the
report when it opens, so PrintOut prints the still-active form rather
than the intended report. What am I overlooking?
Thanks,
Christine
I'm using Access 2000 SR-1 on WinXP, and trying to code a button on a
form to print multiple copies of a particular report. The report
itself works fine, and I can print a single copy using
DoCmd.OpenReport "rptDeedofGift", acViewNormal. To print multiple
copies, I think I need to use DoCmd.PrintOut, but I can't get it to
work.
The command sequence :
DoCmd.OpenReport "rptDeedofGift", acViewPreview
DoCmd.PrintOut acPrintAll, , , , 2, -1
prints two copies of the _form_ on which the button is located.
Then I tried:
DoCmd.SelectObject acReport, "rptDeedofGift", True
DoCmd.PrintOut acPrintAll, , , , 2, -1
with the same result.
Somehow, focus is staying with the form rather than shifting to the
report when it opens, so PrintOut prints the still-active form rather
than the intended report. What am I overlooking?
Thanks,
Christine