How to reset page counter in Group header

  • Thread starter Thread starter Ray
  • Start date Start date
R

Ray

Hi,

In my report I need to put a page count into a Group
header for different invoice, my problem right now is
when there is another invoice with a new number the page
number just keep on counting. How can i reset the page?
Thanks.
 
Thanks, but what if I want to do is place the page number
into Group header and not in page footer instead? How?
 
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.
 
Please forgive my ignorance:

The field that divides the groups is "PRECNAME"

Could you give me more clarity on the controls:
1) Where they are to be placed in the report?
2) When you say "name" the control - within the label or within the control box itself? What is the exact syntax?
3) Do I need a control of "PRECNAME" somewhere in the report?
4) Does it matter if PRECNAME is subdivided into another group (one that I do not want to count the pages of)?
5) Can I list Page X of Y PAges for the Group AND the entire report?

Thank you.

I followed your instructions and I get a dialogue prompt labeled "Enter Parameter Value" - ctlGrpPages as if it is searching for what I mean by that.
 
Back
Top