Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Make field background yellow if the field contains []

In a datasheet view form, how can I make a field background color yellow if the field contains []  (double brackets)
Avatar of SteveL13
SteveL13
Flag of United States of America image

ASKER

So to further explain, if the field read "Some body [] did something"   -  The I want the field background to be yellow.  So anytime [] appears in the cell I want the background to be yellow.
Avatar of Paul MacDonald
Here are instructions from Microsoft Support that describe conditional formatting in Access 2007.  Here is a similar set of instructions that relate to Access 2010, 2013 and 2016.  One of them may work for you.
This all seems to work with numbers.  But I am working with text.
Are you actually looking for the characters []?  Did you try the Like operator?
Yes. I'm looking for those two characters right next to each other. I don't know how to use Like in VBA coding.
Or in conditional formatting.
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can try to select the field in the report and select conditional formatting.

On the conditional formatting dialog, select new rule.
Change "Field value is" to "Expression is"
Enter : <Fiels name> Contains "[]" : in the formula box
Set the formatting you want and OK to close the dialog.

That should do it.
Garfield, you suggestion did not work.