Conditional Formating (1 Viewer)

access2010

Registered User.
Local time
Today, 12:02
Joined
Dec 26, 2009
Messages
1,019
Can I please receive a suggestion on how to use conditional formatting in a field to show the following colours.

If the field is Blank (null) the Background Colour will be White
If the field is Yes the Background Colour will be Green
If the field is No the Background Colour will be Pink

Thank you,
Nicole
 

June7

AWF VIP
Local time
Today, 11:02
Joined
Mar 9, 2014
Messages
5,423
Conditional Formatting can be used only with textbox and combobox. Set BackColor to white then create two CF rules for Yes and No values. Is this a Yes/No field? Yes/No field cannot have Null.

VBA behind a report can set BackColor of any control that has this property. Code must be in Format event and report must be opened in PrintPreview or direct to printer.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:02
Joined
Oct 29, 2018
Messages
21,358
Hi Nicole. So, based on what June7 said, is your field/control a checkbox or a textbox?
 

access2010

Registered User.
Local time
Today, 12:02
Joined
Dec 26, 2009
Messages
1,019
June7 and theDBguy
Thank you for your note and now that we have changed the field to a TextBox from a Yes/ No field the background colours work.

Nicolew
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:02
Joined
Oct 29, 2018
Messages
21,358
June7 and theDBguy
Thank you for your note and now that we have changed the field to a TextBox from a Yes/ No field the background colours work.

Nicolew
Hi. Congratulations! Glad to hear you got it to work. Good luck with your project.
 

access2010

Registered User.
Local time
Today, 12:02
Joined
Dec 26, 2009
Messages
1,019
Conditional Formatting can be used only with textbox and combobox. Set BackColor to white then create two CF rules for Yes and No values. Is this a Yes/No field? Yes/No field cannot have Null.

VBA behind a report can set BackColor of any control that has this property. Code must be in Format event and report must be opened in PrintPreview or direct to printer.
 

access2010

Registered User.
Local time
Today, 12:02
Joined
Dec 26, 2009
Messages
1,019
Thank you for your assistance, and we now have our forms working the way we want.
 

access2010

Registered User.
Local time
Today, 12:02
Joined
Dec 26, 2009
Messages
1,019
Conditional Formatting can be used only with textbox and combobox. Set BackColor to white then create two CF rules for Yes and No values. Is this a Yes/No field? Yes/No field cannot have Null.

VBA behind a report can set BackColor of any control that has this property. Code must be in Format event and report must be opened in PrintPreview or direct to printer.
 

access2010

Registered User.
Local time
Today, 12:02
Joined
Dec 26, 2009
Messages
1,019
Thank you for your assistance, and we now have our forms working the way we want.
 

Users who are viewing this thread

Top Bottom