Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

printing a report with copies

Posted on 1998-12-16
2
Medium Priority
?
280 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 60 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

782 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