OUCH! Wrong structure. Lots of tedious work to get the desired results.
Basic Query would look like
SELECT Dept
, Abs(Sum(Q1="Yes")) as Q1Yes,
, Abs(Sum(Q1="No")) as Q1No,
, Abs(Sum(Q1="N/A")) as Q1NA,
, Abs(Sum(Q1="Correction")) as Q1Correction,
, Count(Q1) as Q1TotalResponses
, Abs(Sum(Q2="Yes")) as Q2Yes,
, Abs(Sum(Q2="No")) as Q2No,
, Abs(Sum(Q2="N/A")) as Q2NA,
, Abs(Sum(Q2="Correction")) as Q2Correction,
, Count(Q2) as Q2TotalResponses
(Repeat 38 more times for the other 38 questions)
FROM [YOUR TABLE NAME]
GROUP BY Dept
You can probably JUST get in all the questions in the max 255 columns of
an Access query.
Good luck.
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
> John here is the sturcture of my tables:
>
[quoted text clipped - 46 lines]
>>>
>>> and the DCOUnt