Solved

printing a report with copies

Posted on 1998-12-16
2
270 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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 …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

776 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