I am getting this error message when I attempt to run the folowing
code
Here I fill a couple of questions for the visitor to fill in. Each
question has 4 answers like excellent, good, fai, poor.
Later i am aggregating the results based on the subject to see how
many have ticked excellent, etc.
Sub GetAnswerPlus(QC)
Dim ANSWERS(), Acount
Dim QTYP
Dim X, I, J
QTYP = Question(2,QC)
' Say "Question " & QC & " has type " & QTYP & "<BR>"
SQL = "SELECT * FROM QVAL Summary WHERE QVALQTYPID = " & QTYP & ";"
Set RS = AC.Execute(SQL)
Acount = 0
Do while not(RS.EOF)
Acount = Acount + 1
ReDim Preserve ANSWERS(2, Acount)
ANSWERS(1,Acount) = RS("QVALDesc")
RS.MoveNext
Loop
' Say "Acount was " & Acount & "<BR>"
RS.Close
' Say "Count is " & COUNT & "<br>"
For X = 1 to COUNT
RESP = RESPID(X)
SQL = "SELECT * FROM Summary WHERE (XFRQQUESID = " & QC & ") "
SQL = SQL & " AND (XFRQRESPID = " & RESP & ") "
SQL = SQL & " AND QVALID > 23;"
Set RS = AC.Execute(SQL)
If RS.EOF Then
Say "N/R" & "<BR>"
Else
Say "<b>" & RS("QVALDesc") & "</b><BR>"
End if
For I = 1 to ACount
If RS("QVALDesc") = ANSWERS(1,I) Then ------> error line
ANSWERS(2,I) = ANSWERS(2,I) + 1
Exit For
End If
Next
RS.Close
' Say SQL & "<br>"
Next
Say "<Table width=100% border=0>"
For I = 1 to Acount
J = CInt(ANSWERS(2,I))
Say "<TR>"
Say "<td width=50% class=left>" & ANSWERS(1,I) & "</td>"
If J > 0 then
Say "<td width=40% class=left><b>" & Int(((J)/Count)*100) & "%
</b></td>"
Else
Say "<td width=40% class=left> </td>"
End if
Say "<td width=10% class=left>" & J & "</td>"
Say "</tr>"
Say ANSWERS(1,I) & ": " & J & " " & Int(((J)/Count)*100) & "%<BR>"
Next
Say "</table>"
End Sub
can you help on this. Any ideas??
Thanks for your help.
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12h7e5r5v/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124394350/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/