JS-Q7: Counting records in report

J

Jack Sheet

Re. Access 97

Help system tells me that to create a footer that shows a count of records,
all I have to do is create a text box in the footer in which I enter the
expression
=COUNT(*)

I do this, but the footer displays #Error.

I originally created the report using the wizard, and it pre-entered the
date expression =now() in the footer, so I solved the problem by copying
that box and editing the expression in the copied box to show =Count(*) and
changed the format from date to number, and now it works fine.

But I cannot find any difference between the properties of the working box
and the #error box (other than box size). Can someone tell me what is the
difference? Thanks.

Please ignore string "JS-Q7" in subject header.
 
F

fredg

Re. Access 97

Help system tells me that to create a footer that shows a count of records,
all I have to do is create a text box in the footer in which I enter the
expression
=COUNT(*)

I do this, but the footer displays #Error.

I originally created the report using the wizard, and it pre-entered the
date expression =now() in the footer, so I solved the problem by copying
that box and editing the expression in the copied box to show =Count(*) and
changed the format from date to number, and now it works fine.

But I cannot find any difference between the properties of the working box
and the #error box (other than box size). Can someone tell me what is the
difference? Thanks.

Please ignore string "JS-Q7" in subject header.

=Count(*) in an unbound control will work (as long the name of the
control is not "Count") .... but NOT in the Page Footer.
I'm very much surprised that your changing the control source of the
date control would make it work. Are you sure you didn't move the
control to a group footer or report footer section? I was not able to
duplicate the change of an =Date() control source in the Page Footer
to = Count(*) and get it to work.
 
J

Jack Sheet

fredg said:
=Count(*) in an unbound control will work (as long the name of the
control is not "Count") .... but NOT in the Page Footer.
I'm very much surprised that your changing the control source of the
date control would make it work. Are you sure you didn't move the
control to a group footer or report footer section? I was not able to
duplicate the change of an =Date() control source in the Page Footer
to = Count(*) and get it to work.

Oh, my mistake. I copied it into report footer, which is why it worked.
Thanks Fred. At least it furthered my understanding.
 

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