Counting unique field entries

J

John Baker

I would like to count the number of non null entries in a field but not to
count duplicate values more than once.
I would also like to count the number of non null entries in a field but to
exclude all zero values from the count.
Can anyone suggest how I might be able to do these 2 things?

Any help greatly appreciated.

John Baker
(e-mail address removed)
 
J

Jeff Boyce

John

Not sure why this is posted in the .reports 'group...?

Totals query, Unique Values = Yes, WHERE YourVar Is Not Null and Not 0

Good luck

Jeff Boyce
<Access MVP>
 
J

John Baker

Thanks for your reply Jeff.
I put my question in the report section because I need to do the count on a
report at both a group level and in the report footer. Sorry for not
explaining my problem more fully.

Would VBA be the only way I could achieve the counts that I need?
 
J

Jeff Boyce

Already answered, John. The previous response pointed out that you would
use a Totals query.

Jeff Boyce
<Access MVP>
 

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