Solved

Page numbers-Easy!

Posted on 2001-06-06
3
225 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
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

777 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