Basically what I am trying to do is on the first report, which has 3 pages, the first page is page one...after cycling through the pages and then closing the report, the next report opens and the page number starts at 4.
I found an example of this, but when I try and incorporate it, it counts each line on the page as a page so instead of saying Page 1, it says Page 25 (the number of lines on the page is 24). I cannot figure it out.
Expand|Select|Wrap|Line Numbers
- (pagenumberfunctions)
- Option Compare Database
- Dim PageNumber As Integer
- Sub initPageNums()
- PageNumber = 0
- End Sub
- Function GetPageNumbers() As Integer
- PageNumber = PageNumber + 1
- GetPageNumbers = PageNumber
- End Function
On the first report, on open, I call initPageNums as an event.
I then have an unbound text box in the page footer that has a control source of
=GetPageNumbers()
But like I said it displays 25 instead of 1, 25 being the number of lines on the page + 1. Why would it count each line as a seperate page?