We help IT Professionals succeed at work.

Microsoft Access Report, Reset Page Number after Group

rjordanbots
rjordanbots asked
on
I have a Ms Access with two groups
  Branch
    User

I would like for the page number field in the page footer to reset after each new group value based on the user group.

   If a set of group records in User has three pages, then I would like to see page 1 of 3 2 of 3 and 3 of 3 then on the next user value, reset back to page 1 again.
Comment
Watch Question

Top Expert 2016
Commented:

Author

Commented:
Can you explain how to use this code ?
Top Expert 2016

Commented:
basically you will place the codes in Report section module as was indicated in the code

this line
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)

indicate that you will use the PageFooterSection in the Format event of that section.

in that link there is sample file that you can download, here is the link
http://www.experts-exchange.com/Database/MS_Access/Q_28128806.html#a39168399

and there is also a video demo

http://www.youtube.com/watch?v=fww9P8MXCR4&list=PL19621FF07B4976BB&index=1

Author

Commented:
How do I determine the groupname to replace with the following code ?

GrpNameCurrent = Me!ID
Top Expert 2016

Commented:
@rjordanbots
better upload a copy of your db.
Top Expert 2016

Commented:
test this
AdRecordsRev.accdb

Author

Commented:
This is working great. I just have one more question. On the user header, I set the proerty force new page before section. The first page of the report is blank. Is their some code that can be put in to place that suppresses this if the report is processing the very first record ?

Commented:
Excellent Answer, as always!!  Thanks so much for your help, Capricorn1!!!!  You just made my day!!!