View Full Version : Counting Record Sets


spcepickle
02-15-2008, 05:49 AM
Hi All - I would like to create a report that showed me the number of records in a given query. I do not want to list the record set that is a result of the query.

For example I have a query that shows me all the projects that were completed in a given state. Now I want a report that shows me
Projects Completed: NH = 4, VT = 6, NY = 10.

I have tried to use the count function in the the query but for the life of me I can not figure it out. I just get a column of ones. :confused:

Thanks!

KenHigg
02-15-2008, 05:53 AM
Maybe you can use dcount()?

Brianwarnock
02-15-2008, 07:19 AM
Not sure what the starting data is but assuming it is a list of numerous NH, VT etc then a query grouping on that field and projectcount:COUNT(*) as an expression will give you the result.

Brian

WayneRyan
02-17-2008, 07:51 PM
pickle,


Select ProjectName, State, Count(*)
From YourTable
Group By ProjectName, State


Wayne

Brianwarnock
02-18-2008, 01:04 AM
:confused:

Isn't that what I said?

Brian