Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apply Conditional Formatting to Control 1

Status
Not open for further replies.

kirstenlargent

Technical User
Sep 30, 2001
43
US
I'm trying to apply conditional formatting to a field in my form. I want the font color to be red if the value in the field is negative. This field is a calculated field, based on other fields in the form.

I tried adding the code to the AfterUpdate, OnDirty, and OnChange events, but none of them work. If I add my code to the OnEnter or OnExit, it will work, but I don't want users to have to click in the calculated field.

Where can I add it so that when I view my form, the color automatically changes based on the value?
Thanks!
 
Hello - If you go to the design view of the form (at least in Access 2002), right click on the control you want to turn red, and choose conditional formatting. You can then enter the conditions needed and choose the format for red text. Hope this helps.
Julie
 
Now that is TOO EASY! I guess I haven't learned all of the new features in 2002!
THANKS!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top