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!

Need a simple bit of code for the OnOpen event on a Report

Status
Not open for further replies.

LDG1234

Programmer
Jun 26, 2001
120
0
0
GB
Hi guyz...

Need to display a message box with the number of pages for a report they know how many pieces of paper to load...

Thanks Lloyd Gozzett
Process Developer
 
Not sure where you would want this information, but you could use :
="Page " & [Page] & " of " & [Pages]
in a report footer and have the report set to preview first, then print.

HTH

Maurie
 
The PAGES property (read only) contains the total number of pages in a report. So if you really wanted the user to know ahead of time how much paper to use, you can just pop up a message box:

Sub Report_Activate
msgbox "This report is " & me!Pages & " pages long. Please put enough paper in the printer." , vbOkonly
end sub


78.5% of all statistics are made up on the spot.
Another free Access forum:
More Access stuff at
 
Thanks Wildhare

Only getting 0 each time I do this.

Any other hints please??? Lloyd Gozzett
Process Developer
 
Thanks for your help on this one.

I opened a recordset before I opened the report which displayed the recordcount in a message box and asked the user if they wanted to continue.

Works nicely but thanks for your input on this one.

Lloyd Gozzett
Process Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top