473,698 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ 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 6542
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.SelectObj ect 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******@examp le.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.SelectObj ect 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********@sbc global.net>
wrote:
>"fredg" <fg******@examp le.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.SelectOb ject acReport, "ReportName ", True
DoCmd.PrintO ut 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 tblNumbeOfCopie s 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 tblNumbeOfCopie s, 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
1244
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 candidates have mastered the office applications or not. we have to develop the test engine in delphi(we have done that).
1
5080
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 crystal reports viewer. This report needs to be printed. Its that simple! I would like to use the report.printtoprinter method as this is direct
6
2213
by: MJ | last post by:
Is it possible to print varying numbers of labels from Access?
4
2521
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 needs. How do I create a button/macro/command to print ALL 5 according to the Autonumber I select? In other words, for each record I want to print 5 reports, the same basic data but different headers/footers. Thanks!!
11
2822
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 report which prints "Office Copy" on the first page, "P.O.B." on the second pages etc. The number of copies is set in the code on the Forms button. I have tried the following in the "On Print " Event on the report. PrintCount = 1 Me.cpi_own =...
5
2496
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 wanted something more elegent by using a txt control on a form instead. The input box code is like this: ' Accepts user input in order that the number of copies required for an exam may be input
4
16809
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 Tip to these Topics. The Tip will actually consist of several Tips which I feel are very useful for all Users, from Newbies to Experts. In order to utilize the code contained within these Tips, you must have Access 2002 or later. How can I...
0
2847
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 printing printing data and the actual database data in a recordset. the class looks like this: Public Class BRPDD 'Balance Report PrintingDocument Data Public totalReceiptsNum As Integer Public totalLicFee As Double
1
2259
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. The subform sometimes contains multiple records, currently if I have four records in the subform, and when I print these reports, it will print the first four signs followed by the four order form records. If I want ten copies each of the order...
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7725
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4369
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3046
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 we have to send another system
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.