Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to design a question having multiple responses

Status
Not open for further replies.

mje397

Programmer
Nov 3, 2004
17
US
I want to include a question in a form which has multiple responses.

For eg.

Q11. Which of the following colors do you like ( check all that apply)

1. Red
2. Blue
3. White
4. Green

What property (combo, option, option group) can I use for this? . I tried most of them, but they allow only one response from the user.

Also if the user selects red and blue, how will this get stored in my database? Can I store it under the same column named "color preference"

Any inputs appreciated..

Thnx

M
 
I'd use checkboxes and have a separate field for each one.

Its going to be easier storing results as Answer1, Answer2, Answer3, Answer4 but this is not a normalised data structure, which can make analysis more difficult.

John
 
Maybe design something like this:

tblUsers
lngUser_ID
strUserFirstName
strUserLastName

tblQuestions
lngQuestion_ID
strQuestion

tblUsersAnswers
lngUser_ID
lngQuestion_ID
lngAnswer_ID

tblAnswers
lngAnswer_ID
strAnswer
 
How are ya mje397 . . .

Have you tried a [blue]MultiSelect Listbox?[/blue]

With code you can store all the selections is a single field and retrieve them later if necessary . . .

Your thoughts!

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top