View Full Version : Count number of records


YNWA
07-02-2009, 01:51 AM
I have a query in which I want to see how many patients there are in a table where the discharge date is null.

Is there a way to count the number of patients who appear in the query or is it just easier to look at the number next to the scroll buttons at the bottom of the query DB?

Say I have 2 records where discharge date is null, is there a way to show within the query that the total records =2?

Thanks

John Big Booty
07-02-2009, 02:06 AM
Check the Count() (http://www.techonthenet.com/access/functions/numeric/count.php) Function.

ajetrumpet
07-02-2009, 06:28 AM
Say I have 2 records where discharge date is null, is there a way to show within the query that the total records =2?

Thanksthere is a button on the top tool bar as well that looks like the summation sign. If you click on that, I think you get an extra line in the query grid called TOTALS. I also think there is a COUNT option in there. check it out...i may be wrong tho

gemma-the-husky
07-02-2009, 07:36 AM
or just

dcount("*","thequeryname")

will tell you how many rows are in the query