totn Access

MS Access 2003: Conditional formatting

This MSAccess tutorial explains how to conditionally format a text box on a form in Access 2003 (with screenshots and step-by-step instructions).

Question: In Microsoft Access 2003/XP/2000/97, how can I apply a conditional format on a text box? I want to change the background color to blue when the text box has focus. How do I do this?

Answer: Conditional formatting allows you to change the behavior of a form object when one of the following conditions is met:

  1. When a field contains a particular value
  2. When a particular expression is found
  3. When a field has the focus

In this example, we'll cover conditional formatting when a field has the focus.

To do this, open the form in design view. Select the text box that you wish to conditionally format. Under the Format menu, select "Conditional Formatting".

Microsoft Access

A Conditional Formatting window should appear.

Under the condition 1 drop-down box, select "Field Has Focus" and then choose the formatting conditions that you want to apply when the field has focus.

In this example, we selected the "paint can" icon and selected blue as the background color.