Conditions
If the date of the activity is older than today's date => print the activity in black
If the date of the activity is younger than the date of today => print the activity in color
The selected activity date must indicate the nearest activity date in the future
The code below does not give the desired selected activity value - the first activity date is selected
Thanks for tips.
<select NAME="ActId">
<%Do While Not rs.EOF%>
<%if rs("ActDate")>date() then%>
<option style="font-family: Arial, Helvetica, sans-serif;color:#0000FF;" value="<%=rs("ActId")%>"><%=rs("Description")%></option>
<%ElseIf rs("ActDate")=date() Then%>
<option style="font-family: Arial, Helvetica, sans-serif;color:#000000;" selected value="<%=rs("ActId")%>"><%=rs("Description")%></option>
<%ElseIf rs("ActDatum")<date() Then%>
<option style="font-family: Arial, Helvetica, sans-serif;color:#000000;" value="<%=rs("ActId")%>"><%=rs("Description")%></option>
<%ElseIf rs("ActDatum")<date() and rs("ActDatum")+1>date() Then%>
<option style="font-family: Arial, Helvetica, sans-serif;color:#000000;" selected value="<%=rs("ActId")%>"><%=rs("Description")%></option>
<%end if%>
<%rs.MoveNext
Loop%>
</select>
If the date of the activity is older than today's date => print the activity in black
If the date of the activity is younger than the date of today => print the activity in color
The selected activity date must indicate the nearest activity date in the future
The code below does not give the desired selected activity value - the first activity date is selected
Thanks for tips.
<select NAME="ActId">
<%Do While Not rs.EOF%>
<%if rs("ActDate")>date() then%>
<option style="font-family: Arial, Helvetica, sans-serif;color:#0000FF;" value="<%=rs("ActId")%>"><%=rs("Description")%></option>
<%ElseIf rs("ActDate")=date() Then%>
<option style="font-family: Arial, Helvetica, sans-serif;color:#000000;" selected value="<%=rs("ActId")%>"><%=rs("Description")%></option>
<%ElseIf rs("ActDatum")<date() Then%>
<option style="font-family: Arial, Helvetica, sans-serif;color:#000000;" value="<%=rs("ActId")%>"><%=rs("Description")%></option>
<%ElseIf rs("ActDatum")<date() and rs("ActDatum")+1>date() Then%>
<option style="font-family: Arial, Helvetica, sans-serif;color:#000000;" selected value="<%=rs("ActId")%>"><%=rs("Description")%></option>
<%end if%>
<%rs.MoveNext
Loop%>
</select>