Solved

printing a report with copies

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now