Sean
|
Posted: 11/18/2003, 9:29 AM |
|
I am using ASP w/templates, Access 2000 and CCS 2.2.
Is there a way to put a condition in a date field (label) to display in red if the condition is met?
Ex. I have a warranty expiration date column. Once the warranty expiration is reached, I would like it to display in red.
I found how to do this with numbers, but not with dates.
Thanks.
|
|
|
Rian
|
Posted: 11/19/2003, 9:35 PM |
|
Hi Sean,
I am trying to accomplish exactly the same thing in a project I am working on. Did you find a solution for this yet?
Maybe you can post the method you got to work for numbers?
Thanks!
Rian
|
|
|
ryan
|
Posted: 11/19/2003, 10:05 PM |
|
I presume that's a grid on the before show row event of your grid try the ff:
dim EvalDate,expireday_,expireday3months_, disp_
EvalDate = CDate(yourformname.warrantyexpirationdatecolumn.value)
expireday_ = CDate(Date())
'I assume to make it expire in 3 months starting this day
expireday3months_ = CDate(DateAdd("m", 3, Date()))
IF (EvalDate>=MINDateByIP AND EvalDate<=expireday3months_) THEN
'do nothing
ELSE
disp_ = "<font color=red>" & _
yourformname.warrantyexpirationdatecolumn.value & _
"</font>"
END IF
Then set the content of that label to HTML instead of text I hope this helps
|
|
|
|