Conditional Formatting Fields in Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everybody:
I need to provide for my client Conditional Formatting Fields in Report like
in Forms: say, value appear in read if it above a limit. I was trying write
the code in format event procedure for detail section. It does not work so
far. Please, help.
Thanks in advance, Ilya.
 
Put the following code in the Format event of the Detail Section:
If Me!NameOfTextbox > YourLimit Then
Me!NameOfTextbox.Forecolor = vbRed
End If
 
If you don't want all "NameOfTextBox" red following the first occurance of
"> YourLimit" then you will need to set the fore color back to black:
If Me!NameOfTextbox > YourLimit Then
Me!NameOfTextbox.Forecolor = vbRed
Else
Me!NameOfTextbox.Forecolor = vbBlack
End If
 
Back
Top