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!

Loop

Status
Not open for further replies.

zishan619

Programmer
May 28, 2003
284
MX
Hi everyone:
I have a table. In this table I have dates that go Something like this.
12/17/03 12/18/03 12/19/03
IN OUT IN OUT IN OUT
8a 12p
1p 5p
blank
blank
blank

I need to do a loop that would make five rows and fill in the fields automatically.
I have something like this currently:
For x=0 to 4
<TR>
rstTime(&quot;dblHours&quot;)
next
I do not know if I started this correctly. Does anyone have an example or a good website that has something like this using a recordset. Thanks
 
what server language?

<Signature>
Sometimes the Answer You Are LOOKING for can be FOUND BY SEARCHING THE FAQ'S @&%$*#!!!
</Signature>
 
I am using microsoft interdev.
with T-SQL statements for my recordsets.
I am using vbscript language.
Also I am also using response.write
I hope this helps.
 
well i use php so hopefully someone with asp background can help

<Signature>
Sometimes the Answer You Are LOOKING for can be FOUND BY SEARCHING THE FAQ'S @&%$*#!!!
</Signature>
 
Best palce to ask the question would be the ASP Forum forum333 then but I think this is what you want....

Dim x : x = 0

Response.Write &quot;<table>&quot;
Do While x < 5 AND NOT rstTime.EOF
Response.Write &quot;<tr><td>&quot; & rstTime(&quot;dblHours&quot;)
Response.Write &quot;</td></tr>&quot;
x = x + 1
Loop
Response.Write &quot;</table>&quot;


_____________________________________________________________________
onpnt2.gif

Hakuna matata!!
 
don't forget the rstTime.MoveNext in that loop either [wink]

_____________________________________________________________________
onpnt2.gif

Hakuna matata!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top