How do I get certain textbox's to change backcolor but other to remain the same. I have a report that needs to change the backcolor of textbox's that contain the word "Warning" to red. The problem is it changes all the textbox's backcolor not just the one specified. Does anyone have any ideas on how to accomplish this?
If InStr(1, Me.Steps, "Caution", vbTextCompare) = 1 Then
'replace it with capts
Me.Steps = Replace(Me.Steps, "Caution", "CAUTION", 1)
Me.Detail.BackColor = 255
End If
If InStr(1, Me.Steps, "Warning") = 1 Then
'replace it with capts
Me.Steps = Replace(Me.Steps, "Warning", "WARNING", 1)
Me.Detail.BackColor = 10
End If
Thank you in advance for any responses
Jeff
If InStr(1, Me.Steps, "Caution", vbTextCompare) = 1 Then
'replace it with capts
Me.Steps = Replace(Me.Steps, "Caution", "CAUTION", 1)
Me.Detail.BackColor = 255
End If
If InStr(1, Me.Steps, "Warning") = 1 Then
'replace it with capts
Me.Steps = Replace(Me.Steps, "Warning", "WARNING", 1)
Me.Detail.BackColor = 10
End If
Thank you in advance for any responses
Jeff