Count by Group

marka87uk

New member
Local time
Today, 04:04
Joined
Jul 13, 2007
Messages
2
Hi,

I was wondering if there a method in Access to allow me to count the number of items by group?

For example, I have a set of data in a table like so:

SA
SA
SA
SP
SP
BM

I can choose Group By and the data will group them like SA, SP, BM; and I can choose Count to count the total number of records, but I would like for instance to be able to retrieve the following data:

SA: 3
SP: 2
BM: 1

Currently I'm exporting the list to Excel, and then using Subtotals. It does exactly what I want, but I'm pretty new to Access and wondered if there's a different way! :)
 
Add the field that contains the Sa etc into the query grid twice, choose Group By under one of them and Count under the other, that will give the desired output.
 
Ah that's great, thanks, I'll have to try that! :)
 

Users who are viewing this thread

Back
Top Bottom