You can set the Conditional Formatting for each text box in the detail
section of your report. You would need something like Expression Is:
[Remarks] Like "*Confidential*"
Another method is to use code in the On Format event of the detail section:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next 'some controls don't have a forecolor
Dim ctl As Control
Dim lngColor As Long
If InStr(Me.Remarks & "", "confidential") > 0 Then
lngColor = vbRed
Else
lngColor = vbBlack
End If
For Each ctl In Me.Section(0).Controls
ctl.ForeColor = lngColor
Next
End Sub
--
Duane Hookom
MS Access MVP
--
David L. said:
If my "Remarks" field contains the word Confidential, I want to turn the
whole record Red, other wise I want to leave it as is? As a new user to
Microsoft Access, I am not familiar with how to build such an expression.