Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-07-2019, 05:14 AM   #1
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 503
Thanks: 323
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Conditional Formating

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

access2010 is offline   Reply With Quote
Old 12-07-2019, 05:23 AM   #2
June7
AWF VIP
 
June7's Avatar
 
Join Date: Mar 2014
Location: The Great Land
Posts: 2,609
Thanks: 1
Thanked 625 Times in 618 Posts
June7 will become famous soon enough June7 will become famous soon enough
Re: Conditional Formating

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.
__________________
Attach File Manager is below Advanced editor window, click Go Advanced below Quick Reply window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June7 is offline   Reply With Quote
The Following User Says Thank You to June7 For This Useful Post:
access2010 (12-07-2019)
Old 12-07-2019, 08:31 AM   #3
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 7,240
Thanks: 63
Thanked 1,678 Times in 1,633 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Conditional Formating

Hi Nicole. So, based on what June7 said, is your field/control a checkbox or a textbox?

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
access2010 (12-07-2019)
Old 12-07-2019, 04:21 PM   #4
access2010
Newly Registered User
 
Join Date: Dec 2009
Posts: 503
Thanks: 323
Thanked 0 Times in 0 Posts
access2010 is on a distinguished road
Re: Conditional Formating

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
access2010 is offline   Reply With Quote
Old 12-07-2019, 05:00 PM   #5
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 7,240
Thanks: 63
Thanked 1,678 Times in 1,633 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Conditional Formating

Quote:
Originally Posted by access2010 View Post
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.

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
access2010 (12-07-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formating wiredgecko1956 Forms 1 03-25-2016 07:51 PM
Conditional Formating MarionD Forms 3 08-01-2013 08:06 AM
Conditional Formating mykil Forms 20 09-21-2011 06:12 AM
VBA & Conditional Formating DanG Modules & VBA 4 05-26-2005 09:49 AM
Conditional formating Mikey Reports 1 02-06-2000 01:29 AM




All times are GMT -8. The time now is 06:21 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World