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!

VB script question?

Status
Not open for further replies.

MavrickStl

Programmer
Feb 20, 2001
71
US
I am trying to build a table from a record set returned by Oracle as follows:

If not rsnew.EOF then

Response.Write _
&quot;<TABLE BORDER=&quot;&quot;1&quot;&quot; CELLSPACING =&quot;&quot;3&quot;&quot; CELLPADDING=&quot;&quot;3&quot;&quot;>&quot; & _
&quot; <TR> &quot; & _
&quot;<TH><FONT face=helvetica,arial,sans-serif color=#660000 SIZE=&quot;&quot;-1&quot;&quot;>&quot;
Response.write &quot;</TR>&quot;
Do While not rsnew.EOF

Response.Write &quot;<TR ALIGN = left>&quot;

Response.Write _
&quot;<TD><FONT face=helvetica,arial,sans-serif color=#660000>&quot;&rsnew(&quot;desc1&quot;)&&quot; </TD>&quot; & _
&quot;</TR>&quot;
rsnew.MoveNext
Loop
Response.Write &quot;</TABLE>&quot;
End if

My problem is I want to make 1st, 6th, 11th, 16th and 21st row the table BOLD or with a different background color?

Can anybody help me out....

Mav
 
Here's a low-tech solution, don't know if anything more sophisticated is available.

Start a counter when you are at the first row, each time you do a movenext, increment the counter.

On each row, before you write to the browser, set up the output in a string variable (its just a bit easier especially with variable output) - the actual contents depend on the value of your counter. If it is regular, you can reset the counter when it hits the required value, or if it is just certain rows you can look to see if the value is in a list.
 
Just a correction to the possible typo in the response #2, which I think is the good one:

If K Mod 5 = 1 Then

- tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top