Access2002 Calculated Field in Page Footer

  • Thread starter Thread starter Tom O.
  • Start date Start date
T

Tom O.

I am grouping my data with a separate group on each page.
I'm using a formula to display the number of records in
each group. The formula is =Count([fieldname]). This
formula works when I place it in the group footer, but I
get an error when I place it in the page footer. Is there
a way to place it in the page footer, or is there a
different formula that will work?
Thanks,
Tom
 
It can't give you a total in the page footer becase the
engine doesn't access or calculate the data that way.
Totals will only work in the group or report footers. You
can try it in code of the report.
1. Declare a variable above all subs or functions of the
report.
2. In the print event of the detail section increment
that global variable with your data.
3. In the print even of the page footer output the
variable to some text box you place in the footer.
A word or caution though. I can't remember if it is the
print or the format event but one of them is done twice
when you display or print so you calculations will be
doubled.

-Cameron Sutherland
 
Back
Top