This topic is locked

row color based on Date Field

6/5/2008 2:34:52 PM
ASPRunnerPro General questions
M
mlgill author

I want any row on my list page to have a red background if the "ElasticDueDate" field has a value of less than the current date. I can't get it to work. I assume my code is wrong and/or in the wrong place. I have it in the ListOnLoad event.
if rs("EleasticDueDate")<"NOW()" then

sShadeClass = "style=""background-color:red"""

end if

C
Codea 6/7/2008

I want any row on my list page to have a red background if the "ElasticDueDate" field has a value of less than the current date. I can't get it to work. I assume my code is wrong and/or in the wrong place. I have it in the ListOnLoad event.

if rs("EleasticDueDate")<"NOW()" then

sShadeClass = "style=""background-color:red"""

end if


Hi mlgill,

Have a "Captain Cook" (a look) at Cell Formatting - Backround Colour Topic. This posting I entered in 2006 helped me with Cell backround colour based on a value in the field. It might help point you in the right direction.
Cheers

Tony <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=30082&image=1&table=forumreplies' class='bbc_emoticon' alt='B)' />

J
Jane 6/17/2008

Hi,
you need to use After Record Processed event:

http://www.asprunner.com/forums/index.php?showtopic=6412