Conditional Formatting Colour (1 Viewer)

access2010

Registered User.
Local time
Today, 13:14
Joined
Dec 26, 2009
Messages
1,019
Hello, using Ms Access 2003 how can I have a conditional format for different words

Green if = Buy, Buy Strong, Buy Weak
Pink if = Sell, Sell Strong, Sell Weak

Thank you,
Nicole
 

Beetle

Duly Registered Boozer
Local time
Today, 14:14
Joined
Apr 30, 2011
Messages
1,808
In form design view, select your text box control, go to Conditional Formatting, then enter two conditions using the Expression Is argument and the In operator. It should look like;



Change Field1 to your actual Control name.
 

access2010

Registered User.
Local time
Today, 13:14
Joined
Dec 26, 2009
Messages
1,019
Thank you for your suggestion which does not work, because for this field the text might be;
Buy, Buy Strong, Buy Weak

We would like to be able to have the Colour Green if any of the words contain [Buy} as above
 

June7

AWF VIP
Local time
Today, 12:14
Joined
Mar 9, 2014
Messages
5,423
Set up 2 rules. Use LIKE operator and wildcard.

LIKE "*Buy*"
LIKE "*Sell*"
 

access2010

Registered User.
Local time
Today, 13:14
Joined
Dec 26, 2009
Messages
1,019
Thank you for this suggestion, but it we have an error

Condition [Expression is]
LIKE "*Buy*"

The expression you entered contains invalid syntax
 

June7

AWF VIP
Local time
Today, 12:14
Joined
Mar 9, 2014
Messages
5,423
Need the field name in the expression.

[fieldname] LIKE "*Buy*"
 

isladogs

MVP / VIP
Local time
Today, 20:14
Joined
Jan 14, 2017
Messages
18,186
Just realised June had already answered but here's a screenshot



Same idea if you want to change the font colour rather than the background
 

Attachments

  • Capture.PNG
    Capture.PNG
    73.7 KB · Views: 226

Beetle

Duly Registered Boozer
Local time
Today, 14:14
Joined
Apr 30, 2011
Messages
1,808
Looks like the image in my response #2 didn't post, there seemed to be problems with the site last night, but it was essentially the same thing that June7 and Colin have suggested. No reason that it shouldn't work for you.
 

isladogs

MVP / VIP
Local time
Today, 20:14
Joined
Jan 14, 2017
Messages
18,186
Looks like the image in my response #2 didn't post, there seemed to be problems with the site last night, but it was essentially the same thing that June7 and Colin have suggested. No reason that it shouldn't work for you.

Ah. I thought it was a 'special type of CF' you were displaying - invisible ;)
 

Beetle

Duly Registered Boozer
Local time
Today, 14:14
Joined
Apr 30, 2011
Messages
1,808
Ah. I thought it was a 'special type of CF' you were displaying - invisible ;)

It may have been just me, not the web site. Occasionally, when I try to make contact with my brain, I find it has the invisibility property set to True. :D
 

access2010

Registered User.
Local time
Today, 13:14
Joined
Dec 26, 2009
Messages
1,019
Thank you for all the suggestions and the conditional formatting now works.

Mary
 

Users who are viewing this thread

Top Bottom