display records in several TDs per TR?

B

btopenworld

Could someone point me in the right direction for writing, say, three
records into three table cells and then starting a new row for the next
three records.

(I've used While not EOF and MoveNext for writing each new record to a new
row - hope several records per row isn't too complicated)

Thanks

John
 
D

Dan Brussee

Could someone point me in the right direction for writing, say, three
records into three table cells and then starting a new row for the next
three records.

(I've used While not EOF and MoveNext for writing each new record to a new
row - hope several records per row isn't too complicated)

Thanks

John

Although there are more complex, and more interesting ways of handling
this, but the most straightforward method is...

cnt = 1
response.write "<TABLE>"
response.write "<TR>"
do while not rs.eof
if cnt = 3 then
response.write "</TR><TR>"
cnt = 1
end if
response.write "<TD>"
response.write "Data"
response.write "</TD>"
cnt = cnt + 1
rs.movenext
loop
do while cnt < 3
response.write "<TD>&nbsp;</TD>"
loop
response.write "</TR>"
response.write "</TABLE>"
 
B

btopenworld

Dan - thanks a lot - you'll gather I'm a beginner and your info was very
helpful. John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top