473,390 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 software developers and data experts.

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 6999
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...

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.