Solved

printing a report with copies

Posted on 1998-12-16
2
271 Views
Last Modified: 2012-05-04
This is tricky.  I've used DoCmd.PrintOut acPages, 1, 1, acMedium, 3 in the on activate event of a report.
The form that executes the printing of the report has two buttons, preview and print.  I want the report to print 3 copies of the report when the print button is clicked,And only preview when the preview is clicked. Each button executes the docmd  DoCmd.OpenReport "rptOrders", acViewNormal  and preview , respectfully.  I set up a variable that is set from each button_click that initializes to 1 or 0 depending on the button.  this is passed to the report and the activate event has an if statement that checks for 0 and executes the DoCmd.PrintOut acPages, 1, 1, acMedium, 3  but this doesn't work.  

any ideas on how to do this effectivly.
0
Comment
Question by:SE081398
2 Comments
 
LVL 3

Accepted Solution

by:
SPECIALIST earned 20 total points
ID: 1971271
hi,

I assume you have a list box that lists the report names on your form.  If I understand your question you can do this.

Have a form with the name of a report in a text box.
have a preview button called preview.
have a print button called printcmb


the on click event of the preview you can do this:

private sub preview_click

docmd.openreport reportname",acpreview
end sub

private sub Printcmb_click

dim i
for i=1 to 3
docmd.openreport "reportname"
next
end sub

this will work for you

Specialist
0
 
LVL 3

Author Comment

by:SE081398
ID: 1971272
This is fine but how does the docm.printout acpages,1,1,,2 thing work.  This should control the printing of a report, do you know how and where this action should be used.  meanwhile I'll use the for loop.  thank you.

 
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
File.Search issue 8 30
Search a table based on a "like" search 6 43
Dot leaders between two labels in report 10 33
Setting that's causing Access to crash 19 33
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question