Count Function

  • Thread starter Thread starter ko
  • Start date Start date
K

ko

Hello!

I have a query with test scores and I 'm trying to get totals of each
answer..

EX:

student name test item 1 test item 2 test item 3
..........
Student 1 A B B
Student 2 B C D
Student 3 A C D
Student 4 D C A
..
..
..
..

I want to count the number of each response , for each question

EX: Total number of A's, B's, C's, D's for Item 1...item 2 etc.


I've benn able to do a crosstab query...which works...but only for one test
item at a time. There are 15 or more items on the test.


Thanks

mike
 
Assumming you have your students in a student table and your tests in a
separate tests table, you should be aiming for a query that gives you a
structure that looks something like this:

Student Name Test Result
.............
Student 1 Test item 1 A
Student 1 Test item 2 B
Student 1 Test item 3 D
Student 2 Test item 1 B
Student 2 Test item 2 C
Student 2 Test item 3 D
...
...

With that structure, all you need then is to do a Group By (on the toolbar
in query design view click 'Totals').

Delordson Kallon
http://www.instantsoftwaretraining.com/default.aspx
 

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

Back
Top