Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

Page numbers-Easy!

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.
0
luceze_99
Asked:
luceze_99
1 Solution
 
DRRYAN3Commented:
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.

How?

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.

How?

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  .
0
 
luceze_99Author Commented:
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.
0
 
tuan1969Commented:
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.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now