total text box field results

G

gh

I have a table with 3 fields formatted as text, they all have 3 choices from
a combo box, "yes", "no", "DNA". How can i total the individual reponses from
each field.
 
B

Brendan Reynolds

SELECT tblTest.Test1 AS TheText, Count(tblTest.Test1) AS TheCount,"Test1"
FROM tblTest
GROUP BY tblTest.Test1
UNION ALL SELECT tblTest.Test2, Count(tblTest.Test2), "Test2"
FROM tblTest
GROUP BY tblTest.Test2
UNION ALL SELECT tblTest.Test3, Count(tblTest.Test3),"Test3"
FROM tblTest
GROUP BY tblTest.Test3;

When you find yourself having to do things like this, it usually indicates a
flaw in the design of the database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top