Count function on reports

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?
 
G

Guest

Thank you - that worked perfectly.

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

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





.
 
K

Khurram

I want to cound number of records displayed in report's
footer. Can you please guide me?
 
S

SA

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)
 
S

SA

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)
 
D

Duane Hookom

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)
 

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