Microsoft Office Tutorials and References
In Depth Information
Choosing Fonts, Colors, and Other Decorative Touches
want to get really weird, you can display the text sideways within the
box by setting the Vertical setting on the Other tab of the property
sheet to Yes.
Copying your formatting
After you go to the effort of prettifying one control, why reinvent the wheel
to make another control to match it? You can simply copy the formatting
from one control to another by using the Format Painter. The Format Painter
copies all formatting — colors, fonts, font sizes, border sizes, alignment, and
anything else that you can think of. Select the beautifully formatted control,
and click the Format Painter button in the Font group on the Format tab of
the Ribbon. Your mouse pointer now has a paintbrush attached to it, so you
know that the tool is active. Click the control that you want to format like
the original control.
Making bad news red
Access has a cool feature called conditional formatting that lets you make a
control look one way normally and a different way — maybe boldface and
red — under special circumstances. The total amount of an order for an
online store, for example, ought to be a positive number unless the customer
is due a refund. Wouldn’t it be great if the form reached out and grabbed you
when the total order amount is negative? Well, Access can’t reach out of the
screen, but it can make the control appear in bright red, boldface, or both.
To set up conditional formatting, you create rules based on two specifications:
✦ What condition must be true for the format to apply? You can check
whether a date is in the past (that is, it’s < today) or whether a number
is less than zero.
✦ What formatting applies? You can make the control a bright color (text
or background), boldface, italic, or underlined.
You can create more than one rule. If the order amount is more than $100,
for example, display it in green; if it’s less than zero, display it in red.
Follow these steps to set up conditional formatting:
1. Select the control in Design view.
2. Click the Conditional Formatting button in the Control Formatting
group on the Format tab of the Ribbon.
You see the Conditional Formatting Rules Manager dialog box, shown
in Figure 2-12. You can use this dialog box to create rules that set the
formatting based on the value of the field or on values in other fields or