ACC2000: Using AutoFormat Changes Appearance of Hyperlinks (198454)
The information in this article applies to:
This article was previously published under Q198454 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you use the AutoFormat feature on a form that contains a hyperlink,
the default color for the hyperlink text is changed.
CAUSE
By default, the hyperlink color is what is specified in the Followed
Hyperlink Color or Hyperlink Color box on the Hyperlinks/HTML tab of the
Options dialog box. However, because the hyperlink control is considered a
label, it uses the default color specified for labels in the format
selected with the AutoFormat feature.
RESOLUTION
There are two methods that you can use to set the color for the hyperlink
text:
- You can set the color for the hyperlink text by using the ForeColor
property for the control.
-or-
- You can specify the color of the hyperlink text by using code.
Setting the Color for the Hyperlink by Using the ForeColor Property- Right-click the hyperlink control, and then click Properties on the
shortcut menu.
- In the Properties dialog box, click the Format tab. Scroll down to
ForeColor, and select the color that you want.
Setting the Color for the Hyperlink by Using Visual Basic Code- Open the form in Design view.
- On the Edit menu, click Select Form.
- On the View menu, click Properties.
- In the Form dialog box, click the Event tab, and then click in the
OnCurrent box.
- Click the Build button to the right of the OnCurrent box. In the Choose
Builder dialog box, click Code Builder, and then click OK.
- To set the color for the text, type or paste the following sample line
of code into the Sub procedure:
Me!HyperLinkControlName.ForeColor = 255
REFERENCES
For more information about the ForeColor property, click Microsoft Access
Help on the Help menu, type ForeColor property in the Office Assistant or
the Answer Wizard, and then click Search to view the topic.
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbprb KB198454 |
---|
|