A report design question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to get a report which looks like:

Yes No # of Responses
question1
question2
quesion3

What would be the best way to do it? How can I do it without having to write
3 queries for each question which ends up with 3x3=9 queries?

Please help, I'm really looking forward to hearing some suggestions. Thanks
 
Start by normalizing your data with a union query.
SELECT Question1 as Response, 1 as Question
FROM tlbQs
UNION ALL
SELECT Question2, 2
FROM tlbQs
UNION ALL
SELECT Question3,3
FROM tlbQs;
Then create a crosstab based on your union query
Use Question as the Row Heading
Count(*) as Row Heading
IIf(Response, "Yes", "No") as the Column Heading
Sum(1) as the Value

--
Duane Hookom
MS Access MVP


Al said:
Hi,

I want to get a report which looks like:

Yes No # of Responses
question1
question2
quesion3

What would be the best way to do it? How can I do it without having to write
3 queries for each question which ends up with 3x3=9 queries?

Please help, I'm really looking forward to hearing some suggestions.
Thanks
 
Back
Top