Count function on reports

  • Thread starter Thread starter JD
  • Start date Start date
J

JD

I use the COUNT function to give a total number of records
in a report. The problem I'm facing is when no records
exist. Instead of reporting zero, it says that there is
one record. When records do exist, the count is correct
(it is not one more than it should be). How can I get
this to report a zero when no records exist?
 
Thank you - that worked perfectly.

-JD
-----Original Message-----
=IIf(HasData, Count(*), 0)

--
Duane Hookom
Microsoft Access MVP
Please direct any questions to News Groups





.
 
I want to cound number of records displayed in report's
footer. Can you please guide me?
 
This is easy to do, simply add a non-visible text box to your report's
detail section called RecCounter and set its control source to be: = 1

Then in the footer, use another text box and have its control source be:
=Sum(RecCounter)
 
This is easy to do, simply add a non-visible text box to your report's
detail section called RecCounter and set its control source to be: = 1

Then in the footer, use another text box and have its control source be:
=Sum(RecCounter)
 
Steve,
Why do you need a text box in the detail section? Can't you just add a text
box to the report footer with a control source of:
=Count(*)
or
=Sum(1)
 
Back
Top