Change the format of a text box or other control on a form or report when it meets certain criteria
- Open the form in Design view or Form view or the report in Design view.
- Make sure that the control is selected, and then, on the Format menu, click Conditional Formatting.
- Do one of the following:
- To use values in the selected control as the formatting criteria, click Field Value Is in the first box, click the comparison phrase in the second box, and then type a value in the third (and fourth) box. You can enter a constant value or an expression.
- To use an expression as the formatting criteria (to evaluate data or a condition other than the values in selected controls), click Expression Is in the first box, and then enter the expression in the second box. The expression must return a logical value of TRUE or FALSE. Learn about creating an expression.
- Select the font style, color, or other formatting that you want to apply.
Microsoft Access applies the selected formatting only if the control value meets the condition, or the expression returns a value of TRUE.
- To add another condition, click Add, and then repeat steps 3 and 4.
You can specify up to three conditions. If none of the specified conditions are true, the control keeps its existing formatting.
Note If more than one specified condition is true, Access applies only the formatting of the first true condition.