Using MS Access/query

Advertisement


Question
i have a table as:
ItemID Q1 Q2 Q3 Q4 Q5
 1     y  n  y  n  n
 2     n  y  y  y  n
 
i want to make a query and calculate how many answer 'y', how many answer 'n'. the query as:

ItemID Q1 Q2 Q3 Q4 Q5 total_y total_n
 1     y  n  y  n  n   2        3
 2     n  y  y  y  n   3        2
Can the Ms Access do this? and how? Please help!
Thanks in advance!

Answer
The problem here is your structure is incorrect. Your table should look like this:

ItemID
Quarter
Answer

From there it will be easy to tabulate the Ys and Ns.

Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Education/Credentials
Brooklyn College BA

©2016 About.com. All rights reserved.