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

Page Numbering in Access Reports

Status
Not open for further replies.

HaworthBantam

Programmer
Jan 31, 2002
132
GB
Morning folks,

I have an Access report that consists of 56,079 pages.

My users like to know which page they are looking at so I placed the obligatory text field at the bottom containing = "Page " & [Page] & " of " & [Pages]

"Perfect", I thought, until I ran the report. The report shows the first page as "Page 1 of -9457" and the last as "Page 56079 of -9457".

Any ideas out there as to why I seem to have a minus number of pages ?

Thanks.

 
Over 50,000 pages??? Someone actually looks at this and wants to know what page they are on? Wouldn't it make more sense to print or preview smaller reports?

If this functionality were important and Access wasn't getting it correct, I would print to a PDF and then open the report in the pdf viewer.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Add 56079 to 9457, and the result is 65,536 - one of the 'magic numbers' of computing, this is 256 x 256.

This provides the clue ... the total number of pages must be calculated as an integer, and Access integer variables can hold values from -32,768 to +32,767. Access does not esxpect a report to have more than 32,767 pages (!) so when you create one, the built in page number counter must become confused.

It 'rolls round' internally once page 32,767 is passed, going back to -32,768 and then approaching zero as the real page number approaches 65,536.

I hope that this helps to explain things ...



Bob Stubbs
 
Great sleuthing Bob!

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Very good sleuthing indeed.

Thanks Bob, I shall have to figure out another method of page numbering.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top