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

nested if in for next loop 1

Status
Not open for further replies.

fluxdemon

MIS
Nov 5, 2002
89
US
Why would

<%
dim i
i=0

Response.Write (&quot;select recordid from table <br>&quot;)

for each item in Request.Form(&quot;recordID&quot;)

i=i+1

if(i>1)then Response.Write(&quot;and recordid = &quot; & item)
else Response.Write(&quot;where recordid = &quot; & item)
end if

next
%>

give me this

Error Type:
Microsoft VBScript compilation (0x800A03FC)
Expected 'Next'
/scott/asp/daily/nov07.asp, line 14
else Response.Write(&quot;where recordid = &quot; & item)

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
 
See if this explains it:


pinky1.jpg width='75' height='75'
[/tt]
056.jpg
 
try this

<%
dim i
i=0

Response.Write (&quot;select recordid from table <br>&quot;)

for each item in Request.Form(&quot;recordID&quot;)

i=i+1

if(i>1)then
Response.Write(&quot;and recordid = &quot; & item)
else
Response.Write(&quot;where recordid = &quot; & item)
end if

next
%>
 
I can't believe it was structure that kept it from running... x.x
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top