chaundy
02-12-2007, 07:35 AM
hello,
I have a table in ASP that take some info from an access database. it lists it in a table. i want to set one cell or row depending on its value. value is always going to be 2 or 3 or 4. i am out putting the value like this;
rstSearch.Fields("Field2").Value
want 2=red 3=blue etc
hope someone can help. not sure if i should do it in the <td bgcolor=> tag or use a variable. hope someone can help me. below is my code for the whole table:
%>
<tr>
<td bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field1").Value %></td>
<td bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field2").Value %></td>
<td width=120 bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field3").Value %></td>
<td width=120 bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field4").Value %></td>
<td width=120 bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field5").Value %></td>
<td bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field10").Value %></td>
<td bgcolor="#D4E5F5"><FONT SIZE="-3"><%= rstSearch.Fields("Field11").Value %></FONT></td>
</tr>
<%
cheers
PAUL
I have a table in ASP that take some info from an access database. it lists it in a table. i want to set one cell or row depending on its value. value is always going to be 2 or 3 or 4. i am out putting the value like this;
rstSearch.Fields("Field2").Value
want 2=red 3=blue etc
hope someone can help. not sure if i should do it in the <td bgcolor=> tag or use a variable. hope someone can help me. below is my code for the whole table:
%>
<tr>
<td bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field1").Value %></td>
<td bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field2").Value %></td>
<td width=120 bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field3").Value %></td>
<td width=120 bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field4").Value %></td>
<td width=120 bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field5").Value %></td>
<td bgcolor="#D4E5F5"><FONT SIZE="-1"><%= rstSearch.Fields("Field10").Value %></td>
<td bgcolor="#D4E5F5"><FONT SIZE="-3"><%= rstSearch.Fields("Field11").Value %></FONT></td>
</tr>
<%
cheers
PAUL