Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Page numbers-Easy!

Posted on 2001-06-06
Medium Priority
Last Modified: 2010-05-18
I know that I've seen this answer before but I can't seem to find it.  I need to reset the page numbers after every group.  (i.e., group 1 pages 1 of 4, group 2 pages 1 of 5, etc.)  Any help would be appreciated.
Question by:luceze_99
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 12

Accepted Solution

DRRYAN3 earned 200 total points
ID: 6160061
Taken straight from A97 help ...

Reset page numbers for each group in a report

Create a macro that resets page numbers

1 Create a macro that uses the SetValue action to change the Page property to 1.


Decide if the page number will appear in the page header or footer, and then use the following values for the SetValue action arguments.

Location of page number     SetValue arguments
Page header     Item:  [Page]Expression:  0
Page footer     Item:  [Page]Expression:  1

2 Save and close the macro.

Modify the report

1     Open the report in Design view.
2     Create a text box for the page number in the page header or footer if you haven't already done so.


3     For the first-level group header and footer, set the following properties, depending on where the page number appears.

If the page number appears in the page header, set the following properties.

Section     Property     Setting     Purpose
Group header     ForceNewPage     Before Section     Starts each group on a new page.
Group footer     OnFormat     Name of macro you created in the first procedure     Resets the page number to 1 for the new group.
If the page number appears in the page footer, set the following properties.

Section     Property     Setting     Purpose
Group header     OnFormat     Name of macro you created in the first procedure     Resets the page number to 1 for the new group.
Group footer     ForceNewPage     After Section     Starts each group on a new page.
Note   The Employee Sales by Country report in the Northwind sample database resets the page number for each country. To view this report, open the Northwind database in the Samples subfolder of your Office folder. In the Database window, click the Reports tab, click Employee Sales By Country, and then click Design. For information on opening Northwind, click  .

Author Comment

ID: 6160307
That's close enough.  I tried to do the set value function on the [pages variable as sum [page]] but it didn't work.  That's a trivial detail any way.  Thanks for your help.

Expert Comment

ID: 20960761
The solution provided by DRRYAN3 works for resetting the page number within each group, but it does not reset the Total # Pages for that group.

For example, I have 100 pages in the report and 25 pages per group.  Each page footer should read "Page 1 of 25".  Instead, all 4 grouping sections read "Page 1 of 100".

Please help.  I find that the solution offered by DRRYAN3 is simplest because it utilizes Access' easy MACRO setup, versus complicated VB and Midules.

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question