Conditional Formating (1 Viewer)

access2010

Registered User.
Local time
Today, 08:11
Joined
Dec 26, 2009
Messages
529
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, 07:11
Joined
Mar 9, 2014
Messages
3,244
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, 08:11
Joined
Oct 29, 2018
Messages
11,128
Hi Nicole. So, based on what June7 said, is your field/control a checkbox or a textbox?
 

access2010

Registered User.
Local time
Today, 08:11
Joined
Dec 26, 2009
Messages
529
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, 08:11
Joined
Oct 29, 2018
Messages
11,128
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, 08:11
Joined
Dec 26, 2009
Messages
529
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, 08:11
Joined
Dec 26, 2009
Messages
529
Thank you for your assistance, and we now have our forms working the way we want.
 

access2010

Registered User.
Local time
Today, 08:11
Joined
Dec 26, 2009
Messages
529
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, 08:11
Joined
Dec 26, 2009
Messages
529
Thank you for your assistance, and we now have our forms working the way we want.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom