strohtm
Posts: 13
|
| Posted: 02/11/2005, 10:33 AM |
|
I have an editable grid which shows questions needing answered.
I would like to provide a radio button or list box for the user to select their choice.
Each question has a different list of answers.
How can I get the list of values to change per row in the grid.
I have created the following code to generate the list of values.
It however has a few problems.
Dim SQL
Dim RecordSet
Dim ErrorMessage
Dim strAnswers
'Find the answers for each question in the survey
SQL = "select answer from answers where question_id = "&SurveyResaults.Question_id.value
set RecordSet = DBconnection1.execute(SQL)
'Build list of answers
do while not recordset.eof
strAnswers = strAnswers &""& RecordSet(0)&", "
DBconnection1.Execute(SQL)
recordset.movenext
loop
RecordSet.Close
Set RecordSet = Nothing
'assign to list of values
Set SurveyResaults.Answer.DataSource = CCCreateDataSource(dsListOfValues, Empty, _
Array(Array(strAnswers),Array(strAnswers)))
I have tried the code under Before Row Show event.
The answers are pulled from the database but each question's listbox shows the answers for the first question rather then their own questions.
The other problem is that rather then putting serveral options in the list it generates one selection with all of the answers in it.
I have triied the code on the list box's before show even but it dosen't seem to execute. The list box takes its values from the property list.
Any ideas?
|
 |
 |
|