473,473 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Print Multiple Copies

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, "rptSuperBill-Blank", True
DoCmd.PrintOut , , , , Me!cmbCopies
I tried a work around using the following syntax but I not only print
the report but the report printing form also.

stDocName = "rptSuperBill-Blank"
DoCmd.OpenReport stDocName, acNormal
DoCmd.PrintOut , , , , Me!cmbCopies

My goal is to be able to print "X" amount of copies and keep the form
that I am using from printing and the Database window hidden.

Any help is appreciated. Thank you in advance,

TD
Nov 13 '05 #1
3 7008
On 25 Oct 2004 10:00:43 -0700, TDIOwa wrote:
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, "rptSuperBill-Blank", True
DoCmd.PrintOut , , , , Me!cmbCopies

I tried a work around using the following syntax but I not only print
the report but the report printing form also.

stDocName = "rptSuperBill-Blank"
DoCmd.OpenReport stDocName, acNormal
DoCmd.PrintOut , , , , Me!cmbCopies

My goal is to be able to print "X" amount of copies and keep the form
that I am using from printing and the Database window hidden.

Any help is appreciated. Thank you in advance,

TD


Try it this way.

DoCmd.OpenReport "rptSuperBill-Blank", acViewPreview
DoCmd.SelectObject acReport, "rptSuperBill-Blank", False
DoCmd.PrintOut , , , , Me!cmbCopies
DoCmd.Close acReport, "rptSuperBill-Blank" ' This line is optional
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2
Bingo Award!!!

Thanks Fred!!!

TD

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
On 25 Oct 2004 10:00:43 -0700, td****@hotmail.com (TDIOwa) wrote:
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, "rptSuperBill-Blank", True
DoCmd.PrintOut , , , , Me!cmbCopies
I tried a work around using the following syntax but I not only print
the report but the report printing form also.

stDocName = "rptSuperBill-Blank"
DoCmd.OpenReport stDocName, acNormal
DoCmd.PrintOut , , , , Me!cmbCopies

My goal is to be able to print "X" amount of copies and keep the form
that I am using from printing and the Database window hidden.

Any help is appreciated. Thank you in advance,

TD


A simple work around.
Create a table called something like tblNoOfCopies. Include a single field in the table as the Primary Key.
Include this table in the recordsource of the report with no joins to any other table.
From your selection form, before printing the report, have some code that clears tblNoOfCopies and then adds one record
for each copy required. eg if yoy want 5 copies, add five records to tblNoOfCopies.

When the report is run the recordsource will not be able to determine a link between tblNoOfCopies and the other
table(s) in the recordsource and so it will return one identical record for each record in tblNoOfCopies. Giving you the
desired number of copies printed.

No need to use the PrintOut method at all.

Wayne Gillespie
Gosford NSW Australia
Nov 13 '05 #4

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

Similar topics

3
by: Terry Murray | last post by:
Hi Everybody, I have been given the task of creating an online coupon system. The only real challenge that I can identify at this point is allowing only one coupon to be printed rather than...
9
by: David Allison | last post by:
cmdButton to Print 3 copies of record in Form view ? cmdButton will print 1 but I need 3 copies of the one Form record. -- Dave Allison
8
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...
10
by: MLH | last post by:
If I wanted 2 of each page, could I make them print out 2 of first page, 2 of second page, 2 of third page, 2 of fourth page and 2 of 5th page? Or, do I have to run the openreport method twice...
1
by: ekey | last post by:
Hi follow function to print many copies but it only print one copy, my document is only one page; but i want to print many copies .such as three copies. how to do? Where do it error? THS ...
9
by: trint | last post by:
Instead of just sending one document at a time, I need to send multiple documents as a print job because our laserprinter will only stack and staple one printjob it receives at a time. I need to...
12
by: eyalco | last post by:
I have a report which I need to copy in 2 different lables. I've set a table with numbers from 0-10 (0 gets "original and all the others get "copy"). The caption is changed by IIF - so now all is ok....
2
by: nrnviv | last post by:
I saw your article on CR and have a question if you can help. using crystal report in VS 2005 C#. I want to print multiple copies(3) of a same report in a single page. Is is possible. Can you ...
2
by: MyWaterloo | last post by:
Hi, I have a databases used to keep track of our purchase orders at my company. There are times when I need to print one copy of an order and times when I need to print multiple. Instead of having...
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...
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
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...
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.