Hyperlink.SubAddress property (Access)

Use the SubAddress property to specify or determine a location within the target document specified by the Address property. Read/write String.

Syntax

expression.SubAddress

expression A variable that represents a Hyperlink object.

Remarks

The SubAddress property can be an object within a Microsoft Access database, a bookmark within a Microsoft Word document, a named range within a Microsoft Excel spreadsheet, a slide within a Microsoft PowerPoint presentation, or a location within an HTML document.

The SubAddress property represents the HyperlinkSubAddress property of a named location within the target document specified by the HyperlinkAddress property.

When you move the cursor over a command button, image control, or label control whose HyperlinkSubAddress property is set, the cursor changes to an upward-pointing hand. Clicking the control displays the object or webpage specified by the link.

For more information about hyperlink addresses and their format, see the Hyperlink.Address property topic.

Example

The following example turns a label named Label20 on the Suppliers form into an active hyperlink. When the user chooses the hyperlink, Access opens the Mailing List form in the Postal Operations database.

With Forms("Suppliers").Controls("Label20").Hyperlink 
 .Address = "PostalOperations.mdb" 
 .SubAddress = "Form Mailing List" 
End With

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.