FontItalic, FontUnderline Properties

FontItalic, FontUnderline Properties

See Also                  Applies To

You can use the FontItalic and FontUnderline properties to specify whether text is italic or underlined respectively in the following situations:

Setting

The FontItalic property uses the following settings.

Setting Visual Basic Description
Yes True (–1) The text is italic.
No False (0) (Default) The text isn't italic.

The FontUnderline property uses the following settings.

Setting Visual Basic Description
Yes True The text is underlined.
No False (Default) The text isn't underlined.

For controls on forms and reports, you can set these properties by using the control's property sheet, a macro, or Visual Basic.

For reports, you can use these properties only in an event procedure or in a macro specified by the OnPrint event property setting.

You can also set these properties by clicking Italic and Underline on the Formatting (Form/Report) toolbar.

You can set the defaults for these properties by using the default control style or the DefaultControl method in Visual Basic.

Remarks

For a text box, combo box, label, or command button that contains a hyperlink, Microsoft Access automatically sets the FontUnderline property to Yes if the Underline Hyperlinks box is checked on the Hyperlinks/HTML tab of the Options dialog box, available by clicking Options on the Tools menu. If you remove the hyperlink from the control (for example, by changing the ControlSource property of a bound text box to a source that isn't a Hyperlink field), Microsoft Access sets the FontUnderline property back to the default control style. For command buttons, the FontUnderline property setting takes effect only if the command button contains a caption rather than a picture.