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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If ...else problem

Status
Not open for further replies.

necta

Technical User
Mar 8, 2004
35
MY
Hi, everyone,
I have the problem with if statement below: It keep asking for the 'Then' although i hv already put one, can anyone please help.
If (gredRS("mrkMin") > Request.marks) AND( gredRS("mrkMax") > Request.marks) Then
grd=Response.Write gredRS("grdID")


Necta
 
Hello necta,

Use () rather than [] in vbs.

regards - tsuji
 
Also use the braces for the whole condition, something like this:

If ((gredRS("mrkMin") > Request.marks)AND( gredRS("mrkMax") > Request.marks)) Then


hope that helps

VJ


 
If the whole statement is not on one line and you aren't using the _ for continuation, you need an end if
 
I found out that it should be ...Request("marks")...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top