Access2002 Calculated Field in Page Footer

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
 
C

Cameron Sutherland

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top