DCOUNT segregation

  • Thread starter Thread starter DubboPete
  • Start date Start date
D

DubboPete

Hi all

Am trying to count the number of records in a table depending on their
"setting". Table is Clinics, containing ClinicID and Setting fields.

I need to know how many fields match "Pharmacy", "Clinic", "Hospital"
and "Private Hospital"

I have searched the group, and tried applying all the different
scenarios for that function, but I can't get DCOUNT to count anything
but the total number! Every syntax I try fails with either "#name" or
Error!

Any help is appreciated

Pete
 
On Wed, 18 Mar 2009 21:29:42 -0700 (PDT), DubboPete

In the Immediate window enter:
?DCount("ClinicID", "Clinics", "setting='Pharmacy'")
(note the single-quotes wrapping the string value Pharmacy)

-Tom.
Microsoft Access MVP
 
On Wed, 18 Mar 2009 21:29:42 -0700 (PDT), DubboPete


In the Immediate window enter:
?DCount("ClinicID", "Clinics", "setting='Pharmacy'")
(note the single-quotes wrapping the string value Pharmacy)

-Tom.
Microsoft Access MVP









- Show quoted text -

Thanks Tom, the single quotes note was the trick!
works fine now...

Pete
 
Back
Top