Link to home
Start Free TrialLog in
Avatar of rjordanbots
rjordanbotsFlag for United States of America

asked on

Microsoft Access Report, Reset Page Number after Group

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.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rjordanbots

ASKER

Can you explain how to use this code ?
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
https://www.experts-exchange.com/questions/28128806/Reset-page-number-and-total-page-count-for-each-group-in-MS-Access-report.html?anchorAnswerId=39168399#a39168399

and there is also a video demo

http://www.youtube.com/watch?v=fww9P8MXCR4&list=PL19621FF07B4976BB&index=1
How do I determine the groupname to replace with the following code ?

GrpNameCurrent = Me!ID
@rjordanbots
better upload a copy of your db.
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 ?
Avatar of deer87
deer87

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