Count in Access
-
Count in Access
Hi, All!
I have an Access 95 database with numerous option groups to capture ratings (using 1 to 5) on various customer-service questions. My problem is getting the reporting function to tell me how many 1s, how many 2s, etc., for each of the approximately 20 questions. So far I can only get it to return which number was marked, but not a total of each rating.
I tried doing a query with the totals and then making another query based on that but using the Count Total function, but that didn't work either. I'm not sure how to get these totals of each rating for each of the option groups. Is it even possible with an option group to set up such reporting? Would the option groups need to be changed to individual checkboxes (ugh!)?
Any help would be appreciated! I must have this working by the end of November.
-
Hi Opus88. I have a bit of experience with Access in certain areas, though I'm more experienced with Access 97 onwards and I'm not too sure of the differences with Access 95.
If I understand correctly, you're using a form for the user to type in integer values from 1 to 5 into different fields. These 'option groups' are views through to fields in a table I presume.
Your query might work if you make use of the COUNT function and the DISTINCT operator. I'm not too sure of the exact syntax (or even if that really would work) but I'm thinking along the lines of Expr1:COUNT(DISTINCT(field1))
.... giving results such as
Field1 Expr1
1 5
2 8
3 17
4 24
5 6
Does that make sense? ..... and, if so, does it help?! 
If not, perhaps you could copy the SQL syntax for your existing query in here so that I can see how far you've got?
Alternatively:
SELECT SUM(NumberOfResults) where Rating=1
SELECT SUM(NumberOfResults) where Rating=2
SELECT SUM(NumberOfResults) where Rating=3
SELECT SUM(NumberOfResults) where Rating=4
SELECT SUM(NumberOfResults) where Rating=5