Results 1 to 2 of 2
2003-10-16, 16:40 #1
- Join Date
- Oct 2003
- Long Beach, California, USA
- Thanked 0 Times in 0 Posts
Custom Report Page Number - per group/section (A2002)
I have a report that group by company numbers.
I would like to display page numbers in the page footer as "Page# of Total Pages."
However, I would like to display page numbers for each group, not for the total report pages.
So, if I have 10 companies with 10 pages each, I would like to display Page# of 10, ten times (not page# of 100).
Any input would be greatly appreciated. Thank you.
2003-10-16, 18:39 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Custom Report Page Number - per group/section (A2002)
To reset the page number to 1 at the start of each company is easy, but to count the number of pages in each group is harder, since you have to pass through the report twice: the first time to count the number of pages for each company, the second time to format the report. You will find a description in ACC97: How to Reset the Page Number and Total Page Count for Each Section of a Report. This MSKB article is for Access 97, but it will work in Access 2000 and up too, provided you set a reference (Tools | References... in the Visual Basic Editor) to the Microsoft DAO 3.6 Object Library, and change the declarations
Dim DB As Database
Dim GrpPages As RecordSet
Dim DB As DAO.Database
Dim GrpPages As DAO.RecordSet
(the first change is not essential, the second is)