Simple ACCESS expression

D

Dot Appleman

This is so elemental it's painful.

In a table with field called CYCLE and one called PW, the
possibilities are A, B, C, D, E for CYCLE
I0, P0, and Y for PW. I want to count the number of Y's for
Cycle A, for Cycle E, etc. ditto for the other PW
possibilities.

My questions:
1 - how to do each in a select query,
2 - how to do it in a report with CYCLE + PW as the
grouping levels, and
3 - can I use another query as the basis for the select
query in which to count? The directions in various ACCESS
books create the query to count from tables.

Thanks a lot,
Dot
 
M

Mark M

You could play around with the crosstab query wizard and see if it generates
what you're looking for.
 
D

Dirk Goldgar

Dot Appleman said:
This is so elemental it's painful.

In a table with field called CYCLE and one called PW, the
possibilities are A, B, C, D, E for CYCLE
I0, P0, and Y for PW. I want to count the number of Y's for
Cycle A, for Cycle E, etc. ditto for the other PW
possibilities.

My questions:
1 - how to do each in a select query,

If I understand what you want, try this (replaceing "YoutTable" with the
name of the table):

SELECT Cycle, PW, Count(*) As TheCount
FROM YourTable
GROUP BY Cycle, PW;
2 - how to do it in a report with CYCLE + PW as the
grouping levels, and

Add a text box in the group footer section of the PW group, with a
controlsource of

=Count(*)
3 - can I use another query as the basis for the select
query in which to count? The directions in various ACCESS
books create the query to count from tables.

I'm not sure I understand this question.
 
Top