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

Don't print form page 2 if no data

Status
Not open for further replies.

mulligh

Technical User
May 8, 2001
97
US
I have a very long form with a page break in the middle. Is there some code I can put in that will prevent it from printing a second page if there's no data on that page?
 
Hi, above is an idea to work with, you can use this code on the OnFormat() Event.

If Me.Page = 2 then
On Error GoTo HandleErr

HandleErr:
Select Case Err.Number
Case Err = 2501 Then
'WORK TO DO NOT PRINT THIS PAGE
'MAYBE ANYONE JUMP IN AND HELP
End Select
End If

Best Regards

---
JoaoTL
NOSPAM_mail@jtl.co.pt
 
I don't know how often page 2 will be blank but why not do this through the normal print process rather than trying to code something. When you select print from the pull down, just specify page 1 of 1. Unfortunately, this option isn't available if you just click the button control instead.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top