473,466 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

printing multiple copies of a report

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
3 6512
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nikolaos | last post by:
Hi all!! i am relatively new to this forum. i am working on a big project in athens greece. it is all about office and vba. basically it is an automated testing software that tests whetther...
1
by: Dreamtime | last post by:
Hi I am using Visual Studio 2005 and the bundled Crystal Reports (previously I used .net 2003 and bundled Crystal Reports for 2 years - same issues!) I have a report which is displayed in the...
6
by: MJ | last post by:
Is it possible to print varying numbers of labels from Access?
4
by: bmdavis | last post by:
Hello, Currently I have a form that I want to print, 5 times for each AUTONUMBER I specify (i.e. print #654 5 times). I have created 5 reports, each with a different header/footer according to my...
11
alpnz
by: alpnz | last post by:
Hi, I am sure someone has managed this one before. I have a report, which I call from a button on a form, which invokes the printing of 4 copies of a report. I would like to have a box on the...
5
by: Dave Richardson | last post by:
Hi, I'm having a nightmare trying to use a form as the basis of capturing the number of copies that a user requires of a report to be printed. I originally used the input box as a solution, but...
4
ADezii
by: ADezii | last post by:
Recently, there seems to be several questions specifically related to Printers and changing Printing characteristics for Forms and Reports. For this reason alone, I decided to dedicate this week's...
0
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the...
1
by: ccmanc68 | last post by:
I would like to print two reports a once. The first report is a sign sheet; the second is an order form. The sign sheet contains the same information as the order form but has a different layout. ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.