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

Build Table Dynamically

Status
Not open for further replies.

ralphtrent

Programmer
Jun 2, 2003
958
US
Hello
I have the following code in place:
Do While not getData.eof
For i = 1 To 5
if i = 1 Then response.write (&quot;<tr>&quot;)
Response.Write(&quot;<td>&quot;&i&&quot; &quot;&getdata(&quot;USERNAME&quot;)&&quot;</td>&quot;)
If i = 5 Then response.write (&quot;</tr>&quot;)
Next
getdata.movenext
Loop

What I want to happen is for every fith value. I have got that working, but the whole row is the same value.
Examples -
What I am geting:
bob bob bob bob bob
frank frank frank frank frank
will will will will will
julie julie julie julie julie
jane jane jane jane jane.

What I want is:
bob frank will julie jane

What am I doing wrong?
 
Try this :
Code:
Response.Write(&quot;<tr>&quot;)
i=0 
Do While not getData.eof
 i=i+1
 If i>5 Then Response.Write(&quot;</tr><tr>&quot;): i=1
 Response.Write(&quot;<td>&quot;&i&&quot; &quot;&getData(&quot;USERNAME&quot;)&&quot;</td>&quot;)
 getData.MoveNext
Loop
Response.Write(&quot;</tr>&quot;)


Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top