On Mon, 22 Sep 2008 06:35:01 -0700, Pookey wrote:
Are you supposed to paste the code in the text box "ctlGrpPages" or paste it
in the footer? Sorry, but I'm a little confused because it's not working.
:
On Fri, 19 Sep 2008 13:28:00 -0700, Pookey wrote:
I'm doing a report and grouping on a field called "Department Name." Please
tell or show me line by line what code I can write in the "On Format" line in
the footer to make the pages numbers restart for each group.
Thanks in advance for any help.
See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm
Things to make sure of:
1) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"
2) Paste the code into the Page Footer Format event.
3) In the code, change Me!Salesman to
Me![Name of the control used to group by]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Paste the code into the Report's Report Footer Format event.
#2 in my previous reply.
Here is how you write (or Paste) code.
First, select all of the code from the web site (everything BETWEEN
the
Private Sub PageFooter_Format(Cancel As Integer, FormatCount As
Integer)
line and the
End Sub
line)
Copy the selected text to the clipboard.
Then open the report in Design View.
Right-click on the Page Footer section.
Select Properties.
Click on the Event tab.
On the Format line write:
[Event Procedure]
Then click on the little button with the 3 dots that appears on that
line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Between these 2 lines write (or in this case, Paste) your code.
Follow the instructions I included in my previous post about changing
the code to reflect your actual field names.
Save the code.