View Full Version : Count


Surjer
10-22-2001, 12:08 PM
Another quick question...
I can't seem to figure out how to use the Count function...

I want to count the number of occurences of a certain Text string in a field..

IE..
Table:
Feature ' String
Northing ' Double
easting ' Double
Elev ' Double
Inventory ' String
Comment ' Note

There are only 5 options for Inventory

GPS
Obscured (GPS)
CNL
Inaccessible/Impeded
EL

I want to count the Number of Each:

I tried:

SELECT Count([Final_MH]![Inventory]) AS Expr1, Final_MH.Inventory
FROM Final_MH
WHERE (((Final_MH.Inventory)="Obscured (GPS)"));

But MS ACCESS laughed at me!

Thanks again,
Jerry

Travis
10-22-2001, 12:57 PM
Set this up in the QBE Grid and you will notice that you left out the Group By on the Inventory Field.

Surjer
10-22-2001, 01:23 PM
QBE GRID?

I guess this is the Design Grid...

Anyways I didn't know you had to use the Group By Function!!

I'm just poking around Access trying to figure it out!

Thanks, youre suggestion did make it work!

Thanks again,
Jerry