Are you saying you always have exactly 52 records? And you want to end up with HTML like this:
<table>
<tr><td>data from record 1</td><td>data from record 27</td></tr>
<tr><td>data from record 2</td><td>data from record 28</td></tr>
...
<tr><td>data from record 26</td><td>data from record 52</td></tr>
</table>
?
If so, the easiest way is to get the recordset into an array first, using rs.GetRows(), because its much easier to access records in any order from the array than it is from the recordset.
So you would end up with:
Code:
... code here to get the recordset
Dim RecordArray
Dim n
Const cField = 0 ' denotes the first field in the recordset
If Not rs.EOF Then
RecordArray = rs.GetRows()
Response.Write("<table>")
For n = 0 to 25 ' this will be executed 26 times
Response.Write("<tr>") ' create a new table row
Response.Write("<td>") ' open the 1st column
Response.Write(RecordArray(cField, n)) ' write the 1st column data
Response.Write("</td>") ' close that 1st column
Response.Write("<td>") ' open the 2nd column
Response.Write(RecordArray(cField, n+26)) ' write the 2nd column data
Response.Write("</td>") ' close that 2nd column
Response.Write("</tr>") ' finished with that row
Next
Response.Write("</table>")
End If
If you have a varying number of records which you need to divide into 2 columns, the above code can easily be generalised, just let me know.
OK?
Phil