Skip to main content
Inspiring
May 3, 2007
Question

Multiple-question survey

  • May 3, 2007
  • 3 replies
  • 235 views
In ASP/Access, I have to create a multiple-question survey, store the
results in a database, and show the percentages on a page. I'm not real sure
where to start... How would you guys do this?

I started by creating recordsets for Q1_Yes, Q1_No, and Q1_N/A, counting the
Yes, No, and N/A answers, then calculating the percentages on the page. For
19 questions, this would be 57 recordsets. I don't think this is the best
way of doing it.

Suggestions?

This topic has been closed for replies.

3 replies

Inspiring
May 4, 2007
Thanks to both of you. It was too simple for me to see.




"jsteinmann" <webforumsuser@macromedia.com> wrote in message
news:f1ebm8$jv0$1@forums.macromedia.com...
> Easy to do. If your answers are yes and no, simply assign a value to the
> correct answer. For example, a correct answer = 1 and a wrong answer = 0.
> If
> you have 10 questions, 10 is a perfect score. Have the form add the
> results
> and send to a results page. So if you had, for example, 8 points, you can
> change it to a percentage. Unless you want to store the results, you
> don't
> have to use the database either. You were going to create 57 recordsets?
> Keep
> it simple.
>

May 4, 2007
Easy to do. If your answers are yes and no, simply assign a value to the correct answer. For example, a correct answer = 1 and a wrong answer = 0. If you have 10 questions, 10 is a perfect score. Have the form add the results and send to a results page. So if you had, for example, 8 points, you can change it to a percentage. Unless you want to store the results, you don't have to use the database either.

Maybe this article will help give you some ideas
http://nlecommerce1.dcccd.edu/pages/250.asp
Participant
May 3, 2007
I think you need a table for questions and a table for answers. The answers table would probably have columns like: RespondantID, QuestionID and Answer. I would store the answers as a single byte 1 for yes 2 for no, 3 for N/A etc. It's then relatively easy to write the SQL to pick out the % of each.