Renumbering pages numbers after each group in a Microsoft Access report

2k views Asked by At

I have a MS report which has a header and footer on my grouping. It has 70 pages with 14 different groups of varying sizes. The first three groups - group 1 has Three (3) pages, group 2 has five (5) pages and the third group has nine (9) pages. I want those pages to number like this (added a space to see the groups easier) 1,2,3, 1,2,3,4,5, 1,2,3,4,5,6,7,8,9 - so that with the first page of each group restarts at number 1.

When I add the following code to the footer of the group grouping:

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
   'this fires 1 page early
   Me.Page = 1
End Sub

It fires one page early and gives the following 1,2,1, 2,3,4,1, 2,3,4,5,6,7,8,9,10,1.

I am open to any thoughts and or solutions.

1

There are 1 answers

1
AVG On

This is a fairly common question. Too much code to post. Check out this link http://access.mvps.org/access/reports/rpt0013.htm It uses arrays to reset the numbering.