This is probably a simple question, but how does one format a table such that if a field is a certain value, then it will have a specific color.
For example, in the code below, if the specific field named "Year" is '2004' then I want it to appear in red, otherwise it should appear in black.
My code is:
<table>
<tr>
<th><p><b>Year</b></p></th>
<th><p><b>Surname</b></p></th>
<th><p><b>First Name</b></p></th>
<th><p><b>Sex</b></p></th>
</tr>
<% Do While Not rstSearch.EOF %>
<tr>
<td><%= rstSearch.Fields("year").Value %></td>
<td><%= rstSearch.Fields("surname").Value %</td>
<td><%= rstSearch.Fields("first").Value %></td>
<td><%= rstSearch.Fields("sex").Value %></td>
</tr>
<% rstSearch.MoveNext
Loop
%>
Many thanks,
J Scham
For example, in the code below, if the specific field named "Year" is '2004' then I want it to appear in red, otherwise it should appear in black.
My code is:
<table>
<tr>
<th><p><b>Year</b></p></th>
<th><p><b>Surname</b></p></th>
<th><p><b>First Name</b></p></th>
<th><p><b>Sex</b></p></th>
</tr>
<% Do While Not rstSearch.EOF %>
<tr>
<td><%= rstSearch.Fields("year").Value %></td>
<td><%= rstSearch.Fields("surname").Value %</td>
<td><%= rstSearch.Fields("first").Value %></td>
<td><%= rstSearch.Fields("sex").Value %></td>
</tr>
<% rstSearch.MoveNext
Loop
%>
Many thanks,
J Scham