Page X of Y for Groups

S

SAC

I would like to make a report show page X of Y for each group of records.

I found info for this on the mvps.org but it says to place it in the
Code-Behind-Reports module. I'm using 97 and I can't find this. I'm I
missing it or do I put it somewhere else for '97?

Thanks.
 
K

Ken Snell [MVP]

That module is the module for the report itself. While in Design view of the
report, click on the Scripts icon on the toolbar (looks like a square of
snakes eating each others' tails). That will take you to the module.
 
F

fredg

I would like to make a report show page X of Y for each group of records.

I found info for this on the mvps.org but it says to place it in the
Code-Behind-Reports module. I'm using 97 and I can't find this. I'm I
missing it or do I put it somewhere else for '97?

Thanks.

Open the report in Design View.
Right-Click on the Page Footer.
Show the properties window.
Click on the Event tab.
Click on the Format event line.
Write
[Event Procedure]
on that line.
Click on the little button with the 3 dots that will appear on that
line.

Paste the code from the mvps site between the 2 already existing lines
of code. (Note: do not paste the first line .. "Private Sub
PageFooter_Format(Cancel As Integer, FormatCount As Integer)"
nor the last line "End Sub" as that already has been written.)

Also write the
Dim GrpArrayPage(), GrpArrayPages()
Dim GrpNameCurrent As Variant, GrpNamePrevious As Variant
Dim GrpPage As Integer, GrpPages As Integer
Up in the Declarations section of the code window.

Follow the rest of the instructions from the mvps site.
 
S

SAC

Thanks.
Ken Snell said:
That module is the module for the report itself. While in Design view of the
report, click on the Scripts icon on the toolbar (looks like a square of
snakes eating each others' tails). That will take you to the module.
 
S

SAC

Thanks!
fredg said:
I would like to make a report show page X of Y for each group of records.

I found info for this on the mvps.org but it says to place it in the
Code-Behind-Reports module. I'm using 97 and I can't find this. I'm I
missing it or do I put it somewhere else for '97?

Thanks.

Open the report in Design View.
Right-Click on the Page Footer.
Show the properties window.
Click on the Event tab.
Click on the Format event line.
Write
[Event Procedure]
on that line.
Click on the little button with the 3 dots that will appear on that
line.

Paste the code from the mvps site between the 2 already existing lines
of code. (Note: do not paste the first line .. "Private Sub
PageFooter_Format(Cancel As Integer, FormatCount As Integer)"
nor the last line "End Sub" as that already has been written.)

Also write the
Dim GrpArrayPage(), GrpArrayPages()
Dim GrpNameCurrent As Variant, GrpNamePrevious As Variant
Dim GrpPage As Integer, GrpPages As Integer
Up in the Declarations section of the code window.

Follow the rest of the instructions from the mvps site.
 
Top