Loop Help!

WillM

Registered User.
Local time
Today, 07:34
Joined
Jan 1, 2014
Messages
83
Good morning!

We have a survey form we are trying to get some information from, and I think I need a loop to get the information, but there isn't a ton of information that I have found for what I need to do.

I have a six question survey that has a range of answers and a comments section (I didn't write the survey):

1. Excellent, Okay, Poor, Very Good, Very Poor
2. Agree, Disagree, Neutral, Strongly Agree, Strongly Disagree
3. Agree, Disagree, Neutral, Strongly Agree, Strongly Disagree
4. Agree, Disagree, Neutral, Strongly Agree, Strongly Disagree
5. Agree, Disagree, Neutral, Strongly Agree, Strongly Disagree
6. Agree, Disagree, Neutral, Strongly Agree, Strongly Disagree

I have a simple query that will separate out the overall Positive and Negative reviews. The overall "Positive" or "Negative" ranking is manually assigned via a combo box on a form from a value list. Poor comments in the comments field can equate to a negative survey, even if questions 1-6 are neutral or better (good, very good, etc.)

What we would like to do is to poll through the responses to the survey and see how many of question 1-6 are consistently receiving Neutral or lower marks.

In my head, it makes sense to count through all the surveys and get a number of those responses. The response table (tblResponses) is setup with a combo box from a look up table that has the above responses. Actually, there are two lookup tables for this...one for question one, and one for questions two - six.

Thanks in advance for any pointers/help. A great tutorial on looping in VBA would be appreciated as well...I really want to wrap my head around it and it is confusing to me.
 
I'm not sure what your table design is, so this may not apply.

If you have a table or query that has QuestionId and AnswerSelected,

Sample data:
Code:
QuestionID	AnswerSelected
1	Excellent
2	Agree
2	Disagree
2	Neutral
1	Poor
3	Strongly Agree
1	Okay
2	Strongly Disagree
1	Okay
1	Okay
2	Agree
2	Disagree
2	Neutral

you could get your counts via SQL

Code:
SELECT [QuestionID] & [AnswerSelected] AS Groupings
, Count(sampleData.AnswerSelected) AS CountOfAnswer
FROM sampleData
GROUP BY [QuestionID] & [AnswerSelected], sampleData.AnswerSelected;

Counts:
Code:
Groupings	CountOfAnswer
1Excellent	1
1Okay	3
1Poor	1
2Agree	2
2Disagree	2
2Neutral	2
2Strongly Disagree	1
3Strongly Agree	1


Good luck.
 
Thanks, I will try that.
 

Users who are viewing this thread

Back
Top Bottom