Thank you. I just sent you a very stripped down version of the file, and its
.mdw file as well.
sjkrause
:
On Fri, 17 Jun 2005 11:08:02 -0700, sjkrause wrote:
Yes, I changed the Me!Salesperson text to the name of the actual RecordID
field. I went so far as to copy the recommended code directly into a new
database with a "Salesperson" field, just to see if I could make it work. It
still didn't.
I am quite new at VBA. I copied the code you sent, opened my report in
design view, clicked on the upper left properties box, opened the "code
builder" option, then pasted the VBA code there. Then I changed the
"salesperson" text as instructed. Have I placed the code incorrectly, or
made some other error which a more experienced person would consider obvious?
Thanks once again for your help.
sjkrause
:
** snipped **
Thank you. I created an unbound text box in the footer, and named it
ctlGrpPages. Access no longer prompts me for a value, but it does not print
anything in the footer.
sjkrause
From the instructions:
*** Note: the line Me!Salesperson should be changed to the control
name of the group you wish to track pages for.
Did you, in addition to adding the ctlGrpPages control to the page
footer, change the the code as instructed, from
GrpNameCurrent = Me!Salesman to
GrpNameCurrent = Me!RecordID
or whatever the name of the field is you are grouping on?
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Let's make it easy.
I can't see what you have, so if you wish, you can send me the Db.
If you do, only send the table/query and whatever else is needed just
for this report. Strip out everything else.
Send it to
(e-mail address removed)
Make sure you write just
GroupPages
as the subject, as I normally delete everything in this email address
without reading.
I sent you a duplicate copy of this via reply to sender.
Just in case you didn't see it, as well as for others who may have
been following this thread, here is what you need to do.
1) In Design View, add a control to the page footer
Set it's control source to:
=[Pages]
You can make this control not visible if you wish.
This added control (=[Pages]) forces Access to format the report
twice; once to count pages, then to actually preview or print.
2) Open the report's code window.
Find the Private Sub PageFooter_Format(Cancel As Integer, FormatCount
As Integer)
code that you pasted in.
Select everything between that line and it's End Sub line.
Cut it.
Delete the Private Sub PageFooter_Format(Cancel As Integer,
FormatCount As Integer) line and the End Sub line.
This code was written to the code window, but [Event Procedure] was
not written on the Format line, so the code was never run!
Exit the code window.
3) Click on the Page Footer Property sheet's Event tab.
In the Format event line, write:
[Event Procedure]
Click on the button with the 3 dots that appears on that line.
When the Page FooterSection code window opens paste the previously cut
code into this new PageFooterSection_Format event between the 2
already existing lines.
Exit the code window.
4) Note: You can also shorten the detail section height to just under
the Sub Report control, as the Sub Report control will grow.
5) Run the report.