Count the number of selections

D

DontKnow

Hi Guys,

I have a unusual request to count the number of records for a particular
entry on a combo box.

Each record has an persons name and asscoiated details with a combo box that
has the capability to select either:
"Current"
"Requested"
"Expired"
"Required"

The combo box has these details in the format of Current, Requested, Expired
and also Required (Ie they are not selected from a table)

How would I sum all of the Currents, Requested, Expired, and also the
Required from the table? I need to do this from a report or a query.

So at the end of the day I have a query or report that says something like:
Currents - 25
Requested - 12
Expired - 32 etc


I have tried a few things but to no avail?

Can someone help me please??
 
A

Allen Browne

Use a totals query.

1. Create a query using this table.

2. In query design view, depress the Total button (upper case Sigma icon on
the toolbar/ribbon.) Access adds a Total row to the query design grid.

3. In the Total row under this field, accept Group By.

4. In the Total row under your primary key field, choose Count.

The query shows one rwo for each status (Current, Requested etc), and a
count beside each one.

Although this works without using a table for the lookup values (the
RowSource for the combo), IMHO it would be a better design if you did use a
lookup table.
 
D

DontKnow

Bloody beautiful mate!!

If you don't use access for a while you certainly forget your skills don't
you!!

Cheers
 

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