Full Version: Counting the number of occurences per domain
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
Daniel_Reijer
Hi!

I am trying to run a query to find out how many projects (ProjectID) occurences there are per organisation (OrgCode). DCOUNT doesn not seem to work because it requires a criteria, I don't want to count the number of projects for organisation "1" only, I want a list of all organisation numbers with next to that the number of projects each organisation carries out.

Hmm I'm sure someone has asked this before but I cannot find the answer on the forums... Thanks for any help!

Daniel.
ScottGem
You need a Group By query. Design your query with OrgCopde as the first Column and ProjectID as the second. Click the Sigma button on the tool bar. Thjis will add a row in the query desig. Set OrgCode as GroupBy and ProjectID as Count.

You can also do this in a Report. Use the Report Wizard to and add OrgCode as a Grouping level. You can select Summary options to count ProjectID. You can then suppress the Detail band by turning its Visible property to No and this will only display the summary.
R. Hicks
Sounds like you need a Totals query ...
Grouped by organisation ...

RDH
Daniel_Reijer
Hi chris!

Thanks a million - didn't know it was that easy!

three clicks and there comes the marvelous table! Thanks!!!!

Daniel.
ScottGem
Chris???

Glad to help.
Daniel_Reijer
Sorry Scott <>

But nevertheless, THANKS A LOT!

Daniel.
ScottGem
you're welcome
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.