By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,480 Members | 2,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,480 IT Pros & Developers. It's quick & easy.

Print Multiple Copies

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.