counting

B

boz

Hi I am struggling in access,but I have a database where I am trying to
create a query whrere i can count the #of patients by patient id field that
received a certain service during a time period. I am pretty sure what I have
is counting the patient id more than once, where i only need it to count the
patient id once. please advise.
 
R

RonaldoOneNil

In query design add your patient ID, the service type field and your date
field. Click on the totals button on the query toolbar. Put the criteria in
for your date field and your service type field then untick the show checkbox
for these 2 columns. Change the group by for these 2 columns to Where.
Save and run the query. The number of rows returned is your count
 
B

boz

THANKS A BUNCH!

RonaldoOneNil said:
In query design add your patient ID, the service type field and your date
field. Click on the totals button on the query toolbar. Put the criteria in
for your date field and your service type field then untick the show checkbox
for these 2 columns. Change the group by for these 2 columns to Where.
Save and run the query. The number of rows returned is your count
 

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