Forum Moderators: open
i can't get the IF THEN statement to work. i am testing the variables as you see at the top of my code and i show you the results. varQ is 1 and varGRR is 2. if i replace one variable name with a number the statement returns correctly, but using both the variables "If varQ < varGRR Then" it does not work. what am i missing? thanks much everybody!
Response.Write varQ & "<Br>"
Response.Write oRS3("questions")& "<Br>"
Dim varGRR
varGRR = oRS3("questions")
Response.Write varGRR & "<Br>"
DimTest = varQ < varGRR
Response.Write DimTest & "<Br>"
DimTest2 = varQ < 2
Response.Write DimTest2 & "<Br>"
DimTest3 = 1 < varGRR
Response.Write DimTest3 & "<Br>"
*********************test results produced********************
1
2
2
False
True
True
******************end test results********************
If varQ < varGRR Then
varQ = varQ + 1
Response.Write "<INPUT TYPE='HIDDEN' NAME='Q' VALUE='" & varQ & "'>"
Response.Write "<p> </p><p><input type='submit' value=" & varQ & " name='submit'></p>"
Else
Response.Write "<INPUT TYPE='HIDDEN' NAME='Q' VALUE='F'>"
Response.Write "<p> </p><p><input type='submit' value='Finish' name='submit'></p>"
End If