Conditional Formatting

Access 2000 introduced conditional formatting, with which data meeting specified criteria displays differently than does data meeting other criteria. For example, you can use conditional formatting to display sales higher than a certain amount in one color and sales lower than that amount in another color.

To conditionally format data displayed within a control, follow these steps:

  1. Select the control you want to conditionally format.

  2. Select Format | Conditional Formatting. The Conditional Formatting dialog box appears.

  3. Select Field Value Is, Expression Is, or Field Has Focus from the first combo box in the Formatting dialog box. You should select Field Value Is when you want to select from a predefined set of operators such as between, not between, and equal to. You should select Expression when you want to build your own conditional expression, which Access will evaluate at runtime. Finally, you should select Field Has Focus if you want Access to apply the conditional format only when that field has the focus.

  4. Select the appropriate operator from the second combo box in the dialog box.

  5. Enter the values you are testing for in the text boxes that appear on the right of the dialog box.

  6. Select the special formatting (bold, italic, background color, and so on) that you want to apply when the conditional criteria are met.

  7. Click Add to add additional formats.

  8. Click OK to apply the conditional formatting.



    Part III: Creating Your Own Database and Objects
    Part V: Advanced Topics