I am calling a table from my database. I want to color the rows that have today's date in the due date. Where would I put the statement for this.
Here's what I have but it doesn't change the background color.
<%
Do While Not rstDBEdit.EOF
Dim ComDate 'Comparison Date, Today's date
Dim vbShortDate
vbShortDate = 2
ComDate= FormatDateTime(Now,vbShortDate) 'So the date will be mm/dd/yyyy
If rstDBEdit.Fields("DateDue"
= ComDate Then
Response.Write "<tr bcolor = orange>"
Else
Response.Write "<tr>"
End If
%>
<td width="2%"><%= rstDBEdit.Fields("ID"
.Value %> </td>
<td width="4%"><%= rstDBEdit.Fields("JobNo"
.Value %> </td>
<td width="10%"><%= rstDBEdit.Fields("Title"
.Value %> </td>
<td width="40%"><%= rstDBEdit.Fields("Description"
.Value %> </td>
<td width="5%"><%= rstDBEdit.Fields("Aircraft"
.Value %> </td>
<td width="6%"><%= rstDBEdit.Fields("JobType"
.Value %> </td>
<td width="6%"><%= rstDBEdit.Fields("Engineer"
.Value %> </td>
<td width="6%"><%= rstDBEdit.Fields("Focal"
.Value %> </td>
<td width="6%"><%= rstDBEdit.Fields("DER"
.Value %> </td>
<td width="3%"><%= rstDBEdit.Fields("DateIn"
.Value %> </td>
<td width="3%"><%= rstDBEdit.Fields("DateDue"
.Value %> </td>
<td width="3%"><%= rstDBEdit.Fields("EightyoneDue"
.Value %> </td>
<td width="3%"><%= rstDBEdit.Fields("DTRDue"
.Value %> </td>
<td width="3%"><a href="<%= SCRIPT_NAME %>?action=delete&id=<%= rstDBEdit.Fields("id"
.Value %>">Delete</a></td>
<td width="3%"><a href="<%= SCRIPT_NAME %>?action=edit&id=<%= rstDBEdit.Fields("id"
.Value %>">Edit</a></td>
</tr>
<%
rstDBEdit.MoveNext
Loop
Here's what I have but it doesn't change the background color.
<%
Do While Not rstDBEdit.EOF
Dim ComDate 'Comparison Date, Today's date
Dim vbShortDate
vbShortDate = 2
ComDate= FormatDateTime(Now,vbShortDate) 'So the date will be mm/dd/yyyy
If rstDBEdit.Fields("DateDue"
Response.Write "<tr bcolor = orange>"
Else
Response.Write "<tr>"
End If
%>
<td width="2%"><%= rstDBEdit.Fields("ID"
<td width="4%"><%= rstDBEdit.Fields("JobNo"
<td width="10%"><%= rstDBEdit.Fields("Title"
<td width="40%"><%= rstDBEdit.Fields("Description"
<td width="5%"><%= rstDBEdit.Fields("Aircraft"
<td width="6%"><%= rstDBEdit.Fields("JobType"
<td width="6%"><%= rstDBEdit.Fields("Engineer"
<td width="6%"><%= rstDBEdit.Fields("Focal"
<td width="6%"><%= rstDBEdit.Fields("DER"
<td width="3%"><%= rstDBEdit.Fields("DateIn"
<td width="3%"><%= rstDBEdit.Fields("DateDue"
<td width="3%"><%= rstDBEdit.Fields("EightyoneDue"
<td width="3%"><%= rstDBEdit.Fields("DTRDue"
<td width="3%"><a href="<%= SCRIPT_NAME %>?action=delete&id=<%= rstDBEdit.Fields("id"
<td width="3%"><a href="<%= SCRIPT_NAME %>?action=edit&id=<%= rstDBEdit.Fields("id"
</tr>
<%
rstDBEdit.MoveNext
Loop