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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command button to print multiple pages per sheet

Status
Not open for further replies.

perfectchaoss

Programmer
Nov 6, 2002
44
US
Is there a way to program a command button to print a report with.
1. 4 pages per sheet
2. A select amount of pages (user defined through a input box or textbox)

I have tried to set the print settings on the report and it seems that if i use a button they get reset.

Thanks in advance,
JF
 
perfectchaoss

I've done this before and am looking for my code now. In the meantime, you can just call your print function twice when you click the print button:

docmd.printreport "report"
docmd.printreport "report"

It's not pretty but it works! I'll try to find my code.

Jim DeGeorge [wavey]
 
try adding this code to the Reports Open Event.. Opens an Input Box for the user to enter the number of Records (sheets). This example is for Portrait (8' possible detail section, 1.25 Margin top & bottom, plus Page Header and Footer)

Private Sub Report_Open(Cancel As Integer)
' 8 * 1440 = 11520
Dim intSheets As Integer, intH As Integer

intSheets = InputBox("Enter # of Records Per Page", "How Many Records Per Page", 1)
intH = 11520 / intSheets
Me.Detail.Height = intH

End Sub

PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top