Conditional Formatting Fields in Report

I

Ilya

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.
 
P

PC Datasheet

Put the following code in the Format event of the Detail Section:
If Me!NameOfTextbox > YourLimit Then
Me!NameOfTextbox.Forecolor = vbRed
End If
 
D

Duane Hookom

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
 
Top