When working with forms, it is often hard to zero in on the important data. Color is one way you can ensure certain data stands out from the rest. For example, you can use color to emphasize that a customer has a $0 balance and, therefore, is eligible for a cash discount. Follow these steps:

Open the form in Design View.

Right-click the form and select Properties.

Click the drop-down arrow under Selection Type and select Form (Figure A).

Figure A

In the Event tab, click the On Current property box, click Event Procedure, and then click the Build button (Figure B)

Figure B

Enter the following code at the prompt:

If Me.Balance > 0 Then

With Me.Balance

.ForeColor = vbWhite

.BackColor = vbRed

.FontBold = True

End With

Else

With Me.Balance

.ForeColor = vbBlack

.BackColor = vbWhite

.FontBold = False

End With

End If

Press Alt + Q.

As you scroll through the records, the Balance field format will change as the field value changes (Figure C).