This topic is locked

Color Coded Records

8/4/2008 1:44:30 PM
ASPRunnerPro General questions
skemp author

Hi,
Can someone please tell me how to color-code records in a listing based on values of 'due today', 'due this week'.
I have table A that has a date field. If the date in that field is today I would like the record in the listing to show up as red, and if the date is between today and the end of the week, I would like for the color to be blue.
Is this possible?
As always, thank you for your help

A
apensler 8/4/2008

Hi,

Can someone please tell me how to color-code records in a listing based on values of 'due today', 'due this week'.
I have table A that has a date field. If the date in that field is today I would like the record in the listing to show up as red, and if the date is between today and the end of the week, I would like for the color to be blue.
Is this possible?
As always, thank you for your help


I use in the custom code in the visual editior for week number being if it is the current week number it is yellow.
WeekNumber = DatePart("ww", Date, 2, vbFirstFourDays)

str = "<table width=100% bgcolor="

if WeekNumber = 39 then

str = str & "yellow"

end if

str = str & "><tr><td>" & strValue & "</td></tr></table>"

strValue = str