Solved

Page numbers-Easy!

Posted on 2001-06-06
3
247 Views
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.
0
Comment
Question by:luceze_99
[X]
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
3 Comments
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 50 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.

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
 

Author Comment

by:luceze_99
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.
0
 

Expert Comment

by:tuan1969
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.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

623 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