I have a list of questions that a user can answer YES or NO to. I am successfully splitting the values and they are being entered into the databse correctly. However, I also need to assign each answer to a factor point (i.e. 2.1, 2.2, 2.3 etc.) and enter the factor point into the database also.
This is probably something really silly that I'm missing, but I am confused on how to get the factor point. Here is my code:
Code:
MyArrayAnswer = split(Request.Form("chkAnswer"),",")
If Request.Form("chkAnswer") <> "" Then
For i = 0 to ubound(MyArrayAnswer,1)
Response.Write "<h1>" & "INSERT INTO tblMOCFactor (FactorPoint, FactorYesNo, MainID) VALUES('" & 2 & chr(46) & Trim(fp) & "', '" & Trim(MyArrayAnswer(i)) & "', " & varMOCID & ")" & "</h1>"
Next
End If
Maybe there is an easier way to do this?
Thanks,
Tammi