Microsoft KB Archive/209222

= ACC2000: Formatted Colors Do Not Appear in Text =

Article ID: 209222

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q209222



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
A text box control does not display text in the color that you specified. Instead, the text is displayed as if you had not specified any color.



CAUSE
If you specify a color without a format in the Format property for a text box, no color will be displayed.



RESOLUTION
Use conditional formatting to change the colors of text in a text box control. To do so, follow these steps:
 * 1) Open the form in Design view.
 * 2) Select the control that you want to change.
 * 3) On the Format menu, click Conditional Formatting.
 * 4) Set the conditions that you want.

For example, set Condition 1 as Field Value is greater than 0 and set Font/Fore Color to Red. Click Add, and then set Condition 2 as Field Value less than or equal to 0 and set Font/Fore Color to Yellow. Click OK.
 * 1) Save and close the form.
 * 2) Open the form in Form view. Note that the values are formatted based on the conditions set in step 4.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb and open the Orders Subform form in Design view. Change the Format property of the Discount text box as follows:

Format: [Red];;[Yellow]

 Save and close the form. Open the Orders form in Form view. Note that the Discount field is not displayed in color.

NOTE: To return the Orders subform back to where it was, open the form in Design View and change the Format property of the Discount text box control back to Percent by selecting Percent from the combo box.

<div class="references_section">