Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

microsoft access 1

Status
Not open for further replies.

molltrotty

IS-IT--Management
Feb 3, 2006
6
0
0
IE
how do i assign multiple reports printing options in a forms print report button?
 
Well I thought you could do this
Code:
Private Sub Command0_Click()
 Dim intCopies As Integer
 intCopies = InputBox("Number of Copies?")
 DoCmd.OpenReport "rptOrders"
 DoCmd.PrintOut acPages, 1, 1, acDraft, intCopies
End Sub
You can use the PrintOut action to print the active object in the open database. You can print datasheets, reports, forms, data access pages, and modules.

Setting

The PrintOut action has the following arguments.

Action argument Description

Print Range
The range to print. Click All (the user can print all of the object), Selection (the user can print the part of the object that's selected), or Pages (the user can specify a range of pages in the Page From and Page To arguments) in the Print Range box in the Action Arguments section of the Macro window. The default is All.

Page From
The first page to print. Printing starts at the top of this page. This argument is required if you select Pages in the Print Range box.

Page To
The last page to print. Printing stops at the bottom of this page. This argument is required if you select Pages in the Print Range box.

Print Quality
The print quality. Click High, Medium, Low, or Draft. The lower the quality, the faster the object prints. The default is High.

Copies
The number of copies to print. The default is 1.

Collate Copies
Click Yes (collate the printed copies) or No (don't collate copies). The object may print faster if this argument is set to No. The default is Yes.

However, when I did this I just got one copy. Not sure why. Maybe play with this, this should be the correct code to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top