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

Alternating row table display

Status
Not open for further replies.

lintow

Programmer
Joined
Nov 29, 2004
Messages
82
Location
US
I would like to have my table to have an alternating display in the rows. I want to use two colors.
I'm not sure if you would use Count method or not

Can someone help me out? I 'm not sure how to set up to code I have to do this method

THIS IS THE CODE I HAVE THAT SHOW STHE TABLE
MY QUERY IS NOT HERE BUT I HAVE IT IN MY PROGRAM

<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<table width="100%" border="2" align="center">
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr>
<td width="16%"><div align="left"><%=(Recordset1.Fields.Item("LAST").Value)%></div></td>
<td width="17%"><div align="left"><%=(Recordset1.Fields.Item("FIRST").Value)%></div></td>
<td width="22%"><div align="center"><%=(Recordset1.Fields.Item("PHONE_EXT").Value)%></div></td>
<td width="16%"><div align="center"><%=(Recordset1.Fields.Item("EMAIL").Value)%></div></td>
<td width="29%"><div align="center"><%=(Recordset1.Fields.Item("DEPT").Value)%></div></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
<tr>
<td height="23">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
</center>
<p>&nbsp;</p>
<BR>
</td>
</tr>
</table>
</td>
<!-- END OF MAIN -->
</tr>
</tbody></table>
</BODY>
</HTML>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top