Randall said:
Dirk,
Sorry, I'm not explaining my problem very well. The query does not return
the "XXXXX"...it just returns that space as blank. I added the x's in the
email to show the spot where the word "small" should appear ... the 0 in
the
adjoining column is the count for the "Small" shirt size...
The question that remains unanswered is, what is in the [Shirt Size] column
for the small shirt sizes. Apparently it isn't "Small", or you wouldn't be
having this problem. Maybe it is Null -- no size recorded -- though that
would be a bad data design, since Null means "no data" or "not applicable",
and shouldn't really be used to represent a meaningful data value.
However, if [Shirt Size] is record as Null for small sizes, then you could
it is Null . If it is Null, then try this:
SELECT
"Shirt Size" AS TYPE,
Nz([Shirt Size], "Small"),
Count([Shirt Size]) AS CountOfShirtSize,
[Apparel-Men]
FROM Committee
GROUP BY
"Shirt Size",
Nz([Shirt Size], "Small"),
[Apparel-Men]
HAVING
(Count([Shirt Size])>0 AND [Apparel-Men]=True)
OR
Count([Shirt Size])=0;
The only way i could get the 0 count for the small size to return is by
adding the Having clause read to include those counts that = 0 or are
greater than 0.
I don't know if you have this right. It seems to me that you may be able to
do without the criterion on [Shirt Size] altogether, and just write this:
SELECT
"Shirt Size" AS TYPE,
Nz([Shirt Size], "Small"),
Count([Shirt Size]) AS CountOfShirtSize,
[Apparel-Men]
FROM Committee
GROUP BY
"Shirt Size",
Nz([Shirt Size], "Small"),
[Apparel-Men]
HAVING [Apparel-Men]=True;
But you should try that and see if you get what you want.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)