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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top