count records in a form

M

Mike W.

I want my report to count the number of records returned, based upon my parameters. I tried adding a field at the bottom of the report, to do so, and entering the expression Count(*). But, it just gives me an error. It does not count my records.
 
A

Allen Browne

Place a text box in the Report Footer section (not page footer).

Set the Control Source of the text box to:
=Count("*")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Mike W. said:
I want my report to count the number of records returned, based upon my
parameters. I tried adding a field at the bottom of the report, to do so,
and entering the expression Count(*). But, it just gives me an error. It
does not count my records.
 
J

Judy Freed

Did you enter Count(*) in the field or =Count(*) in the field? The latter
is correct. Please don't be offended, but I have seen alot of people make
this error when entering formulas in text boxes.

Judy


Mike W. said:
I want my report to count the number of records returned, based upon my
parameters. I tried adding a field at the bottom of the report, to do so,
and entering the expression Count(*). But, it just gives me an error. It
does not count my records.
 
M

Mike W.

Thanks much, Allen. I guess I put my field in the wrong place. Also, I think I wasn't putting the * in quotes. Thanks for elliminating my frustration!
 
M

Mike W.

Judy: When I typed my question, I forgot to add the =. I put in the =, but I guess I put the field in the page footer, and not the report footer, as Allen pointed out. Also, when I put the * in quotes, it worked, even though Access help did not instruct me to do so. So, maybe the combination was causing the error. Thanks for the suggestion. Now I know where to come to next time!
 

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