SteveL13
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)
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.
ASKER
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?
ASKER
Yes. I'm looking for those two characters right next to each other. I don't know how to use Like in VBA coding.
ASKER
Or in conditional formatting.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
ASKER
Garfield, you suggestion did not work.
ASKER