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

Page Numbers for multiple reports 1

Status
Not open for further replies.

mrblonde

Technical User
Mar 16, 2001
187
US
Hello,
I have Access 2000. I am creating a set up that will run about 6 reports, each 1-3 pages long. I'd like to have a macro run this, which I know how to do. However, I don't know how to keep the page numbers going. What I mean is Report 1 would run, using pages 1,2,3, and 4. How do I get Report 2 to automatically start at 5?
 
1st leave off the Pager numbers on all reports
If you create a function that is called from the bottom of each page and store a "Pagenumber" in a global variable it will keep a count for you

----------------- put this in a module -------------
Option Compare Database
Option Explicit

Global PageNumber

------------------ Create this new function
Public Function CountPages()
PageNumber = PageNumber + 1
CountPages = PageNumber
End Function

---------------------- Call it from your report
I put it in the Page footer
="Page " & CountPages()


DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Also, you would need some way to set PageNumber to 1 at the start of the reporting process (also need to do this to re-run a set of reports)

MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top