Report page numbers

G

Guest

I am compiling a booklet that consists of 5 different report designs - how do
I make the page numbers continuous instead of starting over with 1 for each
report?
 
F

fredg

I am compiling a booklet that consists of 5 different report designs - how do
I make the page numbers continuous instead of starting over with 1 for each
report.

Add a new table to your database.
Field Name 'LastPage' Number datatype, Field Size Integer
Table Name 'tblPageNumber'
Enter a Zero (0) as the first record's value.

Code the FIRST report's Open Event:

CurrentDb.Execute "Update tblPageNumber Set tblPageNumber.LastPage =
0" , dbFailOnError

Code the EACH Report's Close event:

CurrentDb.Execute "Update tblPageNumber Set tblPageNumber.LastPage = "
& Me.Page , dbFailOnError

Code the Report Header Format event (whether you use the report header
of not) of EACH OF THE OTHER reports:

Me.[Page] = DLookUp("[LastPage]","tblPageNumber") + 1

If you do not need the Report Header simply add under the above code:
Cancel = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top