Reset page numbers for each group in a report

R

Ruth

I seem to recall having done this very procedure before, but I can't
get it to work now. I have 1100 some-odd records generating reports--
which produces 1600 some-odd pages of report. I want Joe Smith's 2 page
report to show Page 1; Page 2; respectively (rather than Page 1,041;
Page 1,042). Following MS Access Help instruction and creating a macro
which resets the [Page] value to 1-- which is invoked in the header's
On Format property and forcing a new page "After Section" in the group
footer results in having every page numbered Page 1. Copying the code
from Northwind sample database and inserting it in the header produces
the same result.

Ideas? Instruction?

Many thanks!
 
A

Allen Browne

Ruth, did you put your code into the Format event of the *Group* Header, or
the Page Header section?
 
R

Ruth

OK... I'm making a second reply with more information because I really
NEED to have this working by Monday!

The report is a "wish list" for families in need. The top level record
in the report is the parent data with child data grouped underneath.
The main report is grouped on Head of Household name, with both a Group
Header and Footer, Group on Each Value, Group Interval 1, Keep Together
No.

The report detail section contains a subreport that is also grouped--
by each child: Child 1 - Wish List Item 1, Wish List Item 2, Wish List
Item 3, etc. Grouping options are set the same as for the HofH Name
grouping: Group Header and Footer, Group on Each Value, Group Interval
1, Keep Together No.

I'm wondering if this grouping within the subreport is causing me to
get the repeated Page 1.

Thanks again for any ideas you might have on this.

Ruth
 
A

Allen Browne

Hi Ruth.

Have just done some experiementing with this, and found:

1. Problem: If you use the Format event of the group header, it resets to 1
on the last page of the previous section. Becuase you have Force New Page
set to Before, the attempt to fit put the section on the page resets the
number.
Workaround: Use the Print event of the section.

2. Problem: If you have Repeat Section set to Yes, it resets on every page.
Workaround: If you need the heading repeated, create 2 group headers on the
same field, and repeat the other one.

3. Problem: If you don't print all pages of the report, the page resetting
does not work, because the events don't fire for the pages you did not
print.
Workaround: Print all pages, or only the pages for one client (using a
WhereCondition in OpenReport.)

This article might help too:
Printing First and Last Page Numbers for Report Groups
at:
http://www.mvps.org/access/reports/rpt0013.htm

HTH.
 
R

Ruth

Hi Allen! Thank you so much! I will let you know how it works. I had a
feeling the problem stemmed from having something in the wrong
location. And yes, I do have the group header set to repeat so that
information is helpful as well. Thanks for anticipating. Wish me luck!

Regards,
Ruth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top