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

Reset Page counter for page numbering

Status
Not open for further replies.

lanm

Programmer
Jul 7, 2005
244
US
This is what I've tried so far, but it resets on every page.
So, each page is 1 even if the Unique ID spans 2-3 pages.
I only need it to reset on a new field grouping of the list object.


Here's the VB code for the report:

Shared offset As Integer

Public Function GetPN(reset As Boolean, pagenumber As Integer) As Integer
If reset
offset = pagenumber - 1
End If
Return pagenumber - offset
End Function

***************************

In the header, I have a textbox named "tag"

In the footer, I've got the following expression:
="Unique ID Page: " & Code.GetPN(Not(ReportItems!tag.Value Is Nothing),Globals!PageNumber)
 
My fault...I had the textbox "tag" in the page header and not in the list object itself.

It works!

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top