Fred,
Thanks for posting this - I have followed the advice and input the
code listed on the website, but when I open the report, I get a
prompt to set the parameter value for Me. Any idea what I am
missing?
Thanks
This lines in the instructions (marked *** below) may be causing your
difficulty.
Note: the line ***Me!Salesperson should be changed to the
control name of the group you wish to track pages for***.
*** Me!ctlGrpPages is the name of a control you should place in the
page footer***.
You can also change this line to whatever form you wish your page
numbers to take. <
1) In the code, did you change
GrpNameCurrent = Me!Salesperson
to
GrpNameCurrent = Me!WhateverTheActualFieldNameIs"
The control in the report should be named
"WhateverTheActualFieldNameIs", (without the Me!).
2) You should also name the control in the report page footer not
'Me!ctlGrpPages',
but
'ctlGrpPages'.
The use of the Me! keyword is reserved for use in VBA code.
It should not be used anywhere else in your Access database, such as
in a Control source expression or in a control's name.
Within the VBA code, the use of
Me!ctlGrpPages = etc.
is correct.
3) Other than that, perhaps you have incorrectly copied the code.
The code does work.