CheckBox to change the color of a control

DREAMERMX

Registered User.
Local time
Yesterday, 22:10
Joined
Aug 14, 2013
Messages
20
CheckBox to change the color of a control

Hi, I have a CheckBox and a Field Date.

The latter has two conditions: If it is >=now() to be the font is RED and if <=Now() that the font is GREEN

Now, what I need is that pressing the CheckBox, ignore both conditions and that the font color is set GRAY

Thanks!
DMX.-
 
This probably isn't the cleanest way to do this, but it works. In the conditional formatting for your Date Field, have three conditions.
The first should be Expression is: [chkGrey]=Yes, with font colour set to grey (where 'chkGrey' is the name of your checkbox).
The second should be Expression is: [txtDate]>now(), with font colour set to red (where 'txtDate' is the name of your date field.
Finally, have Expression is: [txtDate]<=now(), with font colour set to green.
I can confirm this work in Access 2007.
 
this probably isn't the cleanest way to do this, but it works. In the conditional formatting for your date field, have three conditions.
The first should be expression is: [chkgrey]=yes, with font colour set to grey (where 'chkgrey' is the name of your checkbox).
The second should be expression is: [txtdate]>now(), with font colour set to red (where 'txtdate' is the name of your date field.
Finally, have expression is: [txtdate]<=now(), with font colour set to green.
I can confirm this work in access 2007.


excellent!!! You are a geniussss!!!! Thanks very very much!!
 

Users who are viewing this thread

Back
Top Bottom