Count of certain field

H

Harvard

Here's the deal. I have a field. In that field, i put a, b or c. I want access to automatically count how many of each that i have. is there a way to do this?
 
D

Dirk Goldgar

Harvard said:
Here's the deal. I have a field. In that field, i put a, b or c. I
want access to automatically count how many of each that i have. is
there a way to do this?

Where is this count to be returned? In a query you can write

SELECT MyField, Count(MyField) AS RecCount
FROM MyTable
GROUP BY MyField;

As a ControlSource expression for a calculated form, you can use
something like this (one for each text of three different text boxes:

=Abs(Sum([MyField]="a"))
=Abs(Sum([MyField]="b"))
=Abs(Sum([MyField]="c"))
 
C

Craig at a casino

Open Tables

Go to Records/Filter/Advance,Filter,Sor

Drag the fields you want to see down to the fields row. You will only see the data from the fields you drag down

Or: If the field are all in there already on the filter design then just put the criteria in the field you want to filter

In the criteria cell: Type A or B
Or... what ever you want to filter from the field but you can only type one strin
at a time or you have to use the nest row down and so o

If you want to see everything but A Type NOT "A

If you want to find blank cells then type: nul

Then look down the bottom of your the window where acces tels you how many records were filtered

You can do a similar thing using query design.
 

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