473,903 Members | 6,365 Online
Bytes | Software Development & Data Engineering Community
+ 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.SelectObj ect acReport, "rptSuperBi ll-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 = "rptSuperBi ll-Blank"
DoCmd.OpenRepor t 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 7037
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.SelectObj ect acReport, "rptSuperBi ll-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 = "rptSuperBi ll-Blank"
DoCmd.OpenRepor t 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.OpenRepor t "rptSuperBi ll-Blank", acViewPreview
DoCmd.SelectObj ect acReport, "rptSuperBi ll-Blank", False
DoCmd.PrintOut , , , , Me!cmbCopies
DoCmd.Close acReport, "rptSuperBi ll-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.SelectOb ject acReport, "rptSuperBi ll-Blank", True
DoCmd.PrintO ut , , , , 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 = "rptSuperBi ll-Blank"
DoCmd.OpenRepo rt stDocName, acNormal
DoCmd.PrintO ut , , , , 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
2352
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 several times. Because printing is done on the client side, I thought that it would make sense to post this to newsgroups that cater to the JavaScript folk. Can anyone out there point me to how I would enforce this, that is, allowing only one...
9
4298
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
3977
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...
10
1780
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 which, of course, gives me 2 stacks containing pages 1-5 each?
1
8644
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 private void mn_file_print_Click(object sender, System.EventArgs e) { PrintDialog dlg = new PrintDialog();
9
12982
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 use some of this code: PrinterSettings printerSettings = new PrinterSettings(); printerSettings.MaximumPage = m_numberOfPages; printerSettings.MinimumPage = 1; printerSettings.PrintRange = PrintRange.SomePages; printerSettings.FromPage = 1;...
12
14421
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. The problem is : when users presses a pint button, a small form pops up asking number of copies to print (my intention is to print from the table the 0 + the number of copies, so if chosen 2 copies, we'll get 1 original + 2 copies).. What...
2
9366
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 please help me? Thanks Neetu
2
1380
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 the user click the button for each copy he needs I would like to be able to add a box that he can type the desired number of copies in. What code can I add to my print button that will take the number entered into a text box and print that many...
0
9999
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
11283
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
10875
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
10986
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
10501
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
9685
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
6093
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4727
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
3324
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.