473,421 Members | 1,514 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,421 software developers and data experts.

PrintOut method not setting number of copies...

MLH
Dim HowManyCopies As Integer
HowManyCopies = 4
DoCmd.OpenReport "rptSeparatorSheet", acViewPreview
DoCmd.PrintOut acPrintAll, acHigh, HowManyCopies, False
DoCmd.Close acReport, "rptSeparatorSheet"

Do I have the above syntax wrong. Am trying to get 4 copies
of the report to print. Only 1 is ejecting.
Sep 5 '07 #1
2 3181
ARC
How about this way?

Dim HowManyCopies As Integer, resp as variant, i as integer
HowManyCopies = 4
resp=InputBox("How many copies would you like to print?","Number of
copies", HowManyCopies)
if isnumeric(resp) then
for i = 1 to resp
DoCmd.OpenReport "rptSeparatorSheet", acViewNormal 'normal send
straight to printer
next i
endif
Sep 5 '07 #2
MLH
ARC: I have been doing it the way you recommended. The reason I'm
changing is because I need to be able to control the collating. The
PrintOut method of the DoCmd object will allow me to do that.
for i = 1 to resp
DoCmd.OpenReport "rptSeparatorSheet", acViewNormal
next i
Here's something else I tried after getting a better handle on the
Printout syntax:

DoCmd.OpenReport "MyReport", acViewPreview
DoCmd.PrintOut acPrintAll, , , acHigh, HowManyCopies, False
DoCmd.Close acReport, "MyReport"

That syntax works. Problem solved.
Sep 6 '07 #3

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

Similar topics

0
by: Klefevre | last post by:
Hi, I was wondering why the code below does not work in ASP. Why does the printout method not work? Tx, Kurt Dim m_strPrinterDeviceName Dim m_objExcelApplication, m_objExcelWorkBook,...
5
by: Devin Dow | last post by:
Print Preview looks perfect, but the Printout is cut off (extends off the page). Has anyone else experienced this? A3 paper size seems to exacerbate the problem. I can't believe it because...
2
by: Will | last post by:
I have a 1 page report which I want to print numerous copies of. The number of copies will be specified by the user. My problem is that I want each report to print the copy number of number of...
2
by: Smartin | last post by:
Question about DoCmd.PrintOut in A97. I have a form on which all the controls are unbound. There is a large textbox that the user can type stuff in and a couple labels. I am trying to code a...
1
by: Venkatesha R | last post by:
Hi, I,m using printer dialog box,at runtime i need to know the number of printout copies user has entered. how do i get it in c#.net
2
by: Wayne | last post by:
I'm using the following line of code to print only the first page of a report: DoCmd.PrintOut acPages, 1, 1 This works fine with one limitation. It sends the report to the default printer. ...
6
by: EJO | last post by:
TIA, There is already a form (Access 2k) with the selected record and a button with this code behind it: DoCmd.PrintOut acSelection Except that Access does not print the acSelection, it...
1
by: Peader | last post by:
Hi, Does anybody know the VB code for the PrintOut Action i can use in ms access? DoCmd .printout is a no brainer, but how do i go from here to specifying: Print Range Page From Page To...
1
by: =?Utf-8?B?S2ltIFM=?= | last post by:
I have a word document I only want to printout ( not save as file ) and I use Word printout method in backgrund but my XP operativ i so slow that a "dummy" dociment also get stored. which...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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,...
0
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...
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,...

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.