About applying conditional formatting to a control

Microsoft Office Access 2003

Show All Show All

About applying conditional formatting to a control

If a control on a form or report contains values that you want to monitor, apply conditional formatting to the control to make it easier to spot. For example, you can set conditional formatting so that if an employee's salary exceeds $100,000 the field's background turns red. Or you can set formatting so that text in the City field is green and italic if a customer resides in Seattle.

You can set conditional formatting based on the value in a control, an arbitrary expression referencing another control, a user-defined Visual Basic for Applications function, or the control with focus. You can change the color of the text, make the text bold, italic, or underlined, or enable or disable a control when it meets or doesn't meet criteria you specify.

If the value of the control changes and no longer meets the specified condition, Microsoft Access returns to the default formatting for the control. Conditional formatting remains applied to the controls until you remove the formatting, even if none of the conditions are met and the specified control formatting is not displayed.

You cannot use wildcards— such as the asterisk (*), question mark (?), or any other symbol— in criteria as substitutions for text or number characters.

Note  You cannot apply conditional formatting to a control on a data access page.