Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change field background color in report based on text

Status
Not open for further replies.
Dec 20, 2004
30
US
Hi. I want to change the background color of "item" field on Aceess report to yellow, if it contains text "special editoin."-without case sensitivity. How would I do this? Conditoinal formatting only enables number values, not text. Thank you for your help.
 
You can use text or numeric values that evaluate to either true or false. For instance if I have a text box with job title and I want to highlight titles containing "rep", use Expression is:
Code:
InStr([Title],"rep")>0

Duane
Hook'D on Access
MS Access MVP
 
Hello, Duane. Thanks for your reply. So, is it something like this?

If InStr([Title],"rep")>0 Then
Me.[Title].BackColor = vbYellow
Else
Me.[Title].BackColor = vbWhite
End If

But where should I put that Expression if the above is correct? Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top