MS ACCESS: Report page numbers

1. Is there any built-in way (other than custom VB code) to set the starting page number for a report?
A client has three reports that she consecutively/contiguously spews out to a PDF file, and she ends up having to not use ACCESS page numbers and insert page numbers in Acrobat.

2. In this same 3-report document, the first report is a summary (table of contents as such) listing of the records, which lists the page number the detail records are displayed.  She does this manually in acrobat(!)
I assume there's no way other than a combination of pre-running the detail reports to UPDATE their own record to capture what page they ended up on, and then use that (new) field to print in the table of contents.
(It's actually a little more complicated, in that the detailed records can appear on multiple pages, thus I would guess a X-product (relational) side table is needed to record each page # listing in new records, and then have custom code to list (multiple) page numbers in the TOC)

thanks!
willsherwoodAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

answer_dudeCommented:
Without code or something else to be the datasource (using another field to drive the page number), I'm not aware of any other way to reset the page number.

However, with VBA, using the code below pasted into your report module and then setting the Control Source property of your page number field to:

="Page " & ([Page]+GlobalPageNumber()) & " of  " & ([Pages]+GlobalPageNumber())

The user will be prompted for the starting page number when the report is run.  Optionally, you could drive that starting page number from another process, data value, or calculation.
Option Explicit
Dim globalPage As Integer

Function GlobalPageNumber()
    GlobalPageNumber = globalPage - 1
End Function

Private Sub Report_Open(Cancel As Integer)
    globalPage = InputBox("Starting Page Number: ", "Starting Page Number", 1)
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
willsherwoodAuthor Commented:
super, many thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.