Conditional Formatting

Dante1980

Registered User.
Local time
Yesterday, 19:36
Joined
Mar 20, 2006
Messages
11
Hi Guys,

I've a question and I hope you can help me out.......
I'm trying to use Conditional Formatting Options on a Text box called "Date". I'd like that this box become Red if its value is between value1 from Text box "Start Date" and value2 from Text box "End Date" or Green otherwise (in this way the color change dynamically every time I change the values of Text Boxes "Start Date " and "End Date"). How can I do that? What I need to type in the Conditional Formatting Windows?

Thanks a lot for you help!!!!

Ciao Ciao
 
My advice would be to use visual basic in the after update code.

If Date > StartDate AND Date < EndDate Then
Date.BackColor = RGB(255, 0, 0) 'Set it to red
Else
Date.BackColor = RGB(0, 255, 0) 'Set it to green
End If

If you need the code to be run based on other things like the form first loading or a record being changed then put it in a function and call the function.

I hope I have been helpful
 

Users who are viewing this thread

Back
Top Bottom