By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,819 Members | 1,573 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,819 IT Pros & Developers. It's quick & easy.

printing multiple copies of a report

P: n/a
Hi,

Is there a way to make a report print out more than once using the VBA
code behind a button, without having to put the code in multiple
times?

I want to print out the same report four times, with page 1 of 4
through to 4 of 4 in the footer.

Can anyone help?

Thanks,

Franc
Mar 2 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Sun, 2 Mar 2008 08:26:13 -0800 (PST), franc sutherland wrote:
Hi,

Is there a way to make a report print out more than once using the VBA
code behind a button, without having to put the code in multiple
times?

I want to print out the same report four times, with page 1 of 4
through to 4 of 4 in the footer.

Can anyone help?

Thanks,

Franc

Look up the SelectObject and the PrintOut methods in VBA help.

If the report is NOT open in Preview, then:

DoCmd.SelectObject acReport, "ReportName", True
DoCmd.PrintOut acPrintAll, , , , 4

If the Report is open in Preview, then change True to False in the
above code.

To display the page number at in the Page Footer, add an unbound
control to the footer.
Set it's control source to:
="Page " & [Page] & " of " & [Pages]

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Mar 2 '08 #2

P: n/a
"fredg" <fg******@example.invalidwrote in message
news:12******************************@40tude.net.. .
On Sun, 2 Mar 2008 08:26:13 -0800 (PST), franc sutherland wrote:
>Hi,

Is there a way to make a report print out more than once using the VBA
code behind a button, without having to put the code in multiple
times?

I want to print out the same report four times, with page 1 of 4
through to 4 of 4 in the footer.

Can anyone help?

Thanks,

Franc


Look up the SelectObject and the PrintOut methods in VBA help.

If the report is NOT open in Preview, then:

DoCmd.SelectObject acReport, "ReportName", True
DoCmd.PrintOut acPrintAll, , , , 4

If the Report is open in Preview, then change True to False in the
above code.

To display the page number at in the Page Footer, add an unbound
control to the footer.
Set it's control source to:
="Page " & [Page] & " of " & [Pages]

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
I think the original poster wants "Copy 1 of 4", then "Copy 2 of 4", etc on
the pages.
I do not know how to do that.
Fred Zuckerman
Mar 2 '08 #3

P: n/a
On Sun, 2 Mar 2008 15:00:23 -0800, "Fred Zuckerman" <Zu********@sbcglobal.net>
wrote:
>"fredg" <fg******@example.invalidwrote in message
news:12******************************@40tude.net. ..
>On Sun, 2 Mar 2008 08:26:13 -0800 (PST), franc sutherland wrote:
>>Hi,

Is there a way to make a report print out more than once using the VBA
code behind a button, without having to put the code in multiple
times?

I want to print out the same report four times, with page 1 of 4
through to 4 of 4 in the footer.

Can anyone help?

Thanks,

Franc


Look up the SelectObject and the PrintOut methods in VBA help.

If the report is NOT open in Preview, then:

DoCmd.SelectObject acReport, "ReportName", True
DoCmd.PrintOut acPrintAll, , , , 4

If the Report is open in Preview, then change True to False in the
above code.

To display the page number at in the Page Footer, add an unbound
control to the footer.
Set it's control source to:
="Page " & [Page] & " of " & [Pages]

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

I think the original poster wants "Copy 1 of 4", then "Copy 2 of 4", etc on
the pages.
I do not know how to do that.
Fred Zuckerman
Create a table tblNumbeOfCopies with a single field NumCopies.
Add 1 record for each copy you want. 1,2,3,4 etc

Add this table to the recordsource of the report with no joins to any other
table. Include NumCopies as a field in the recordsource.

The recordset will return one record for each record in tblNumbeOfCopies, all
identical except for the value of NumCopies.

You can then use NumCopies in your report to display the copy number.

Wayne Gillespie
Gosford NSW Australia
Mar 3 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.