Counting in Report by Group

xeen20

Registered User.
Local time
Today, 05:54
Joined
Aug 9, 2007
Messages
40
--------------------------------------------------------------------------------

Hi,
I am new to access i am having a prob with a report hope u guyz help me

My Table is



name ---- type(type have only 3 values( p,u and z ) but repeated)
x----------p
x----------u
y----------p
x----------z
y-----------p
x------------z
x------------u
x-------------u

Based on above table
i would like to have a report like
count of type with respect to names

Group by name
name ---- Type
x ........... p=1
..............u=3
...............z=2

y.............p=2
...............u=0
................z=1
 
A query that would produce those results:

SELECT Name, Type, Count(Type) AS HowMany
FROM TableName
GROUP BY Name, Type

Hopefully those are made up field names, as both name and type are reserved words and shouldn't be used as field names:

http://support.microsoft.com/kb/286335/
 
Thanks It worked
i appericiate you help
WHAT IF i want
Report as
Group by name
name ---- Type
x ........... p=1
..............u=3
...............z=2

y.............p=2
...............u=0
................z=1

p = 3
u=3
z=3
 
Last edited:

Users who are viewing this thread

Back
Top Bottom