Forums
This topic is locked
Repeat in diffrent colors
Posted 28 Sep 2001 22:42:01
1
has voted
28 Sep 2001 22:42:01 Anton Sutterlueti posted:
How is that effect to do, if i have a repeat from a source, to repeat in colors like this:1 grey background
2 white background
3 grey background
4 white background
and so on
how can that be done, and it should be sorted by date not by ID number
thanxx allot
ToXiT
Replies
Replied 28 Sep 2001 23:15:00
28 Sep 2001 23:15:00 Owen Eastwick replied:
Try something like this:
<pre id=code><font face=courier size=2 id=code>
<% Counter = 1 %>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))%>
<%If Counter Mod 2 = 0 Then%>
<tr bgcolor="#C0C0C0" valign="top">
<td width="50"><font size="-2" face="Arial, Helvetica, sans-serif"><%=(Recordset1.Fields.Item("TextID".Value)%>
</font></td>
<td width="150"><font size="-2" face="Arial, Helvetica, sans-serif"><%=(Recordset1.Fields.Item("ItemTitle".Value)%>
</font></td>
<td width="500"><font size="-2" face="Arial, Helvetica, sans-serif"><%= (Recordset1.Fields.Item("ItemText".Value"%>
</font></td>
</tr>
<% Else %>
<tr bgcolor="#E5E5E5" valign="top">
<td width="50"><font size="-2" face="Arial, Helvetica, sans-serif"><%=(Recordset1.Fields.Item("TextID".Value)%>
</font></td>
<td width="150"><font size="-2" face="Arial, Helvetica, sans-serif"><%=(Recordset1.Fields.Item("ItemTitle".Value)%>
</font></td>
<td width="500"><font size="-2" face="Arial, Helvetica, sans-serif"><%= (Recordset1.Fields.Item("ItemText".Value)%>
</font></td>
</tr>
<% End If %>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Counter = Counter 1
Wend
%>
</font id=code></pre id=code>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Edited by - oeastwick on 09/28/2001 23:20:02
<pre id=code><font face=courier size=2 id=code>
<% Counter = 1 %>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))%>
<%If Counter Mod 2 = 0 Then%>
<tr bgcolor="#C0C0C0" valign="top">
<td width="50"><font size="-2" face="Arial, Helvetica, sans-serif"><%=(Recordset1.Fields.Item("TextID".Value)%>
</font></td>
<td width="150"><font size="-2" face="Arial, Helvetica, sans-serif"><%=(Recordset1.Fields.Item("ItemTitle".Value)%>
</font></td>
<td width="500"><font size="-2" face="Arial, Helvetica, sans-serif"><%= (Recordset1.Fields.Item("ItemText".Value"%>
</font></td>
</tr>
<% Else %>
<tr bgcolor="#E5E5E5" valign="top">
<td width="50"><font size="-2" face="Arial, Helvetica, sans-serif"><%=(Recordset1.Fields.Item("TextID".Value)%>
</font></td>
<td width="150"><font size="-2" face="Arial, Helvetica, sans-serif"><%=(Recordset1.Fields.Item("ItemTitle".Value)%>
</font></td>
<td width="500"><font size="-2" face="Arial, Helvetica, sans-serif"><%= (Recordset1.Fields.Item("ItemText".Value)%>
</font></td>
</tr>
<% End If %>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Counter = Counter 1
Wend
%>
</font id=code></pre id=code>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Edited by - oeastwick on 09/28/2001 23:20:02