Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting records from a query...

Status
Not open for further replies.

dodgyone

Technical User
Jan 26, 2001
431
GB
I have a series of queries which give results depending upon certain date. From these I create charts etc.

What I would like is to count how many records there are once the query has completed (the date criteria is not fixed so the query requests the dates as you start it up). I would then like to be able to place this total in a table, in a certain row.

Is DCount the best options... how does it work etc?

Thanks,

Marcus
 
DCount can do what you want. the best thing to do is look at the help on database functions in excel. This will explain how DCount is used.




 
I have just had a closer look at DCount. I would try using CountIf first.

CountIf(Range,Criteria)

example:

=CountIf(A:A,">20")

this will return how many cell values are over 20 in column A.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top