Sum of selected responses

J

Joe Leon

I have a table, tlbMembers, where one of the categories, ShirtSizes, is
entered via a drop down window in a form. The drop down window is derived
from a table that had the following in it:

Table name: tlbShirtSizes1
Contents:
Small
Medium
Large
X-Large
XX-Large
This table does not have an ID primary key.

What I'd like to do is develop a query that gives me the sum of each
individual selected shirt size from all the records entered. Then I can use
the query to create a report with 5 columns showing the results of the query.
Thanks...Joe...
 
O

Ofer Cohen

I'm not sure about the structure of the table, but you can try an SQL such

SELECT TableName.categories, TableName.ShirtSizes,
Count(TableName.ShirtSizes) AS CountOfShirtSizes
FROM TableName
GROUP BY TableName.categories, TableName.ShirtSizes
 
J

Joe Leon

Thanks!!!! It worked great... How would I create a report to show the
results in seperate columns? For example:

Small Medium Large X-Large XX-Large
0 1 1 4 3

Thanks again !!
 
J

John Vinson

Thanks!!!! It worked great... How would I create a report to show the
results in seperate columns? For example:

Small Medium Large X-Large XX-Large
0 1 1 4 3

With a Crosstab query. Use the query wizard and choose Crosstab.

John W. Vinson[MVP]
 
Top