Report that shows # of occurances of a value NOT the respective records. How?

J

JohnB

Hi.

I hope this isn't a no brainer.
I need to design a report that will show me how many times a given
value occurs in a given field.
I do not need a list of all the records that contain that value.

So far every query I've designed can filter the db based on that
criteria but I can't design one that just gives me the total.

Specifically, I have a field in our db that we use to record if a
customer found our business by looking in the yellow pages, a google
search, a referral from a friend, etc..

Any ideas?

Thanks
JB
 
M

Marshall Barton

JohnB said:
I hope this isn't a no brainer.
I need to design a report that will show me how many times a given
value occurs in a given field.
I do not need a list of all the records that contain that value.

So far every query I've designed can filter the db based on that
criteria but I can't design one that just gives me the total.

Specifically, I have a field in our db that we use to record if a
customer found our business by looking in the yellow pages, a google
search, a referral from a friend, etc..


To count the occurances of a single specific value, you can
use a text box with an expression like:
=Abs(Sum([the field] = specificvalue))

But, if you have several values you want to count, you
should construct a query that counts everything and use that
as the basis for a subreport. The query could be along
these lines:

SELECT [the field], Count([the field]) As thecount
FROM thetable
WHERE . . .
GROUP BY [the field]
 

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