473,799 Members | 3,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print report multiple times based on value in the report

Hi all

Help please.

I would like to automate the printing of a report.
The report actually is a single page and prints a label. I would like to be
able to print the report multiple times based on the value of the items
field.
I have a command button which opens the report in the print option. This
works fine when there is only 1 item.
Ideally if there were 5 items then the report would print 5 times. I seem to
be tying myself in knots trying to do this.
Many thanks in advance.

B Garner
Jan 31 '06 #1
2 2881
"B Garner" <br***@leach-ltd.getridofthi s.co.uk> wrote in message
news:dr******** **@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...
Hi all

Help please.

I would like to automate the printing of a report.
The report actually is a single page and prints a label. I would like to
be able to print the report multiple times based on the value of the items
field.
I have a command button which opens the report in the print option. This
works fine when there is only 1 item.
Ideally if there were 5 items then the report would print 5 times. I seem
to be tying myself in knots trying to do this.
Many thanks in advance.

B Garner

There are many solutions to this. One solution involving no vba coding is
to create a table tblNumber:

Qty F1
1 1
2 1
2 2
3 1
3 2
3 3
4 1
4 2
4 3
4 4
etc

Then you can base the report on a query which joins tblYourTable.Qt y to
tblNumber.Qty so you get the correct number of records. Although this
approach is simple and reliable you would have to make sure your tblNumber
had sufficient entries - you could do this by entering records for numbers 1
to 50, and putting a validation rule on tblYourTable.Qt y to ensure it was
not more than 50.

Jan 31 '06 #2
Perhaps, you can modify this to do what you want.
' Customers report must have
' HasModule property set to Yes
Sub PrintCustomers( ByVal Printings As Long)
Dim Customers As Report_Customer s
Set Customers = New Report_Customer s
Customers.Visib le = True
While Printings > 0
DoCmd.PrintOut
Printings = Printings - 1
Wend
Set Customers = Nothing
End Sub

Sub test()
PrintCustomers 3
End Sub

Jan 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5828
by: Tom Louchbaum | last post by:
When I preview my Access 2000 Report it looks fine. When I Email the report using DoCmd.SendObject acSendReport, "Report", acFormatRTF, "To Address", , , "Subject", , False the resulting attachment to the email consistently does not display all of the lines it should in one of the GroupFooters. I am using the Print event in the report to print lines multiple times in a groupfooter depending on an integer set elsewhere in the VBA...
8
3971
by: Hank Reed | last post by:
Hello, I have searched through dozens of old responses to this question but have been unable to make it work in my situation. I'm using Access 2000 We have a very old sticker printer on a serial line. Neither situation is going to be upgraded so don't suggest that. A simple sticker report takes 10 seconds to reach the printer. That is not an issue for me. But, if I want 5 copies of the same sticker, most methods I have tried...
3
2745
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have reports at the plan (overall totals), department and division levels which have sorting and grouping implemented with this new
3
7028
by: TDIOwa | last post by:
I have a report printing form (Access 97) in which I print different reports from. I have added a combo box that selects the number of copies that I want to print. Here is the rub... The following is the syntax that I use. The only problem is that I have the Database window hidden at all times and when I hit the print command button the report prints but the Database window becomes visible. DoCmd.SelectObject acReport,...
2
2098
by: (Pete Cresswell) | last post by:
I have a situation where a bunch of statistics are being presented based on a mutual fund and a benchmark fund's monthly and quarterly returns for a given period (like 10 years....) The hitch is that all bets are off if all four return streams are not complete and contiguous. In that case, however, the user needs to know which fund(s) have returns missing for which dates so they can backfill them. I started out with a single report...
2
4267
by: ghat12 | last post by:
Hi, I am trying to print a subform containing approx 50 columns in datasheet view. The printout cannot fit more than 8-10 columns. Does anyone know of any way to print all columns; i don't care if the printout spans multiple pages. FYI, the records displayed in the sub-form are dynamically obtained based on some ad-hoc querying in the main form. Any report, etc. generated will have to have the same set of records.
1
3196
by: Sam | last post by:
Hi All I have a web page that contains a datagrid and in this data grid, I have a checkbox column template which allow user to select one or more applicant's loan applicantion to print. Currently I have to loop thru the list of applications and call an aspx page to load each application and use a javascript "window.print" function to pop-up the print dialog; and user has to click on the print button to print This appearantly becomes a...
6
9432
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate report" button located on my form to print all of the list box values (that have been updated via selection from combo boxes) from the form to the report. I've tried using a macro with the code: Macro Name: cmdGenerateReport : On Click Action:...
12
3544
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to print the report three times, but do not know how
0
9688
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
10259
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
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
9077
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...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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.