Create a hyperlink
When you create a hyperlink
by using any of the following methods, Microsoft Access creates a label control on the form or report. Although hyperlinks in a report won't work when viewed in
Access, the hyperlinks will work when you output the report to Microsoft Word, to Microsoft Excel, or to HTML.
Notes
- You can open the target document or Web page by clicking the hyperlink in a
table or query, or in
a form in Datasheet view
or Form view.
- In a data access page, the text box in which you enter a
hyperlink address displays the hyperlink address as a text string, not as a
formatted hyperlink. The formatted address can
be found in the Hyperlink
property of the text box.
The ScreenTip
displayed for a hyperlink on a data access page
is defined in the hyperlink control, so a ScreenTip that you enter won't
be displayed on the page.
To see a newly created hyperlink address displayed as a formatted
hyperlink on the data access page, click Refresh on the Microsoft Internet
Explorer toolbar.
Type a hyperlink in a field or text box
- Open the table, query, or form in Datasheet
view, the form in Form view, or the data access
page in Page view.
- Place the insertion point in the hyperlink
field in the datasheet or in the text box or other control that accepts
hyperlinks on the form or data access page.
- Type a valid hyperlink address. A defined hyperlink address can have
up to four parts separated by the number sign (#):
displaytext#address#subaddress#screentip
The following example includes displaytext, address,
and screentip. Note that it also includes the # for subaddress,
which has been omitted:
Microsoft Corporation#http://example.microsoft.com/##Example
page for Microsoft Corporation
Access adds the hyperlink to the field or control.
Paste a hyperlink from a Microsoft Office document
- Open an Office document that contains a hyperlink.
- Right-click the hyperlink that you want to copy.
Point to Hyperlink on the shortcut menu, and then click Copy
Hyperlink.
Note When you copy a hyperlink in
an Office document, make sure to copy just the hyperlink itself. If you copy
characters that surround the hyperlink but aren't part of the hyperlink, Access will link to the text that you selected instead of to the
hyperlink address.
- Switch to Access and open a form or
report in Design
view.
- On the Edit
menu,
click Paste
as Hyperlink.
Access adds a label to the form or report. To
test the link, right-click the label, point to Hyperlink on the
shortcut menu, and then click Open.
Link
to text in a Microsoft Office document
- Open the Office document that you want to link to.
For example, open a Microsoft Word document.
Note
You can create a hyperlink by using
text that you select in a data access page, but not text pasted from other Access
objects.
- Select the text you want to link to.
- On the Edit menu, click Copy.
- Switch to Access and open a form or
report in Design
view.
- On the Edit menu, click Paste as Hyperlink.
Access adds a label to the form or report. To
test the link, right-click the label, point to Hyperlink on the
shortcut menu, and then click Open.
Drag
an Internet shortcut to a form or report
- Open a form in Design view or a report in Design
view.
- Locate
the desired Internet shortcut (such
as an icon on your desktop).
- Select the Internet shortcut.
- Use the right mouse button to drag the selection to the form
or report.
Access adds a label to the form or report. To
test the link, right-click the label, point to Hyperlink on the
shortcut menu, and then click Open.
Create a hyperlink between data access pages
in the current database
- Open a data access page in Design view.
- On the Insert menu, click Hyperlink.
- In the Insert Hyperlink dialog box, click Page in
this database under Link to.
- In the Text to display box, type the text that you
want to be displayed in the field or text box. If you leave the box blank, Access will use the hyperlink address as the display text.
- Click ScreenTip and type the text that you want to appear
when the user rests the pointer on the hyperlink. If you leave the ScreenTip
text box blank, Access will display the hyperlink address as
the ScreenTip.
- From the list, select the data access page you want to link
to.
- To create a filter for the data access page, click Server Filter. In the Server Filter dialog box, type an expression in the form of a WHERE clause in the Filter criteria for the data access page text box. For example, if you have a data access page that displays order information, including the ID of the salesperson, and you want to link to a second data access page with the employee record about that salesperson, type EmployeeID=[EmployeeID].
- Click OK.
Access adds the hyperlink to the data access page.
To test the link, switch to Page view and click the
hyperlink. Access opens the target page in your Web browser.
Create a link to an existing file or Web page
- Open a form, a report, or a data access page in Design view.
- On the Insert menu, click Hyperlink.
- In the Insert Hyperlink dialog box, click Existing
file or Web page under Link to.
- In the Text to display box, type the display text for
the hyperlink. If you leave it blank, Access uses the hyperlink
address and/or subaddress as the display text.
- Click ScreenTip, and type the text you want to appear
when the user rests the pointer on the hyperlink. If you leave the ScreenTip
text box blank, Access will display the hyperlink address
and/or subaddress as the ScreenTip.
- In
the Address
box, type a path or a URL.
- Click Current
Folder, Browsed
Pages, or Recent
Files, and then click an item from the list. If you click Current
Folder and don't see the object you want, select a different folder from
the Look in box.
Note You can go to a specific location in an HTML
file or to an object
in the
current Microsoft
Access database (.mdb) or Microsoft Access
project (.adp). Click Bookmark, select the bookmark
or object you
want in the list, and then click OK.
- To create a filter (data access page only), click Server Filter. In the Server Filter dialog box, type an expression in the form of a WHERE clause in the Filter criteria for the data access page text box. For example, if you have a data access page that displays order information, including the ID of the salesperson, and you want to link to a second data access page with the employee record about that salesperson, type EmployeeID=[EmployeeID].
- Click OK in the Insert Hyperlink box.
On a data access page, Access adds the hyperlink in
a hyperlink control. In a form or report, it adds the hyperlink in a label.
To test the link on a data access page, switch to Page view and
click the hyperlink. To test the link on a form or report, right-click the
label, point to Hyperlink on the shortcut menu, and then click Open.
Create a link to a table, query, form, report, or data access page
- Open a form or a report in Design
view.
- Click Insert Hyperlink
on the toolbar.
- In the Insert Hyperlink dialog box, click Object
in this database under Link to.
- In the Text to display box, type the text that you
want displayed in the field or text box. If you leave the box blank, Access will use the type of object and the object name as the
display text.
- Click ScreenTip, and type the text that you want to
appear when the user rests the pointer on the hyperlink. If you leave the ScreenTip
text box blank, Access will display the type of object
and the object name as the ScreenTip.
- From the list, select the database object that you want to
link to.
- Click OK.
Access adds the hyperlink in a label. To test the
link, right-click the label, point to Hyperlink on the shortcut menu,
and then click Open.
Note To link to an object in another database, select
the desired database file, and then click Bookmark
to list the objects within that database.
Create a link that opens your e-mail program and creates a message addressed to the specified e-mail address
- Open a form, a report, or a data access page in Design view.
- On the Insert menu, click Hyperlink.
- In the Insert Hyperlink dialog box, click E-mail
address under Link to.
- In the Text to display box, type the text that you
want displayed in the field or text box. If you leave the box blank, Access will use the e-mail address as the display text.
- Click ScreenTip, and type the text that you want to
appear when the user rests the pointer on the hyperlink. If you leave the ScreenTip
text box blank, Access will display the e-mail address as
the ScreenTip.
- In the E-mail address box, type an e-mail address. You
can also select an address from the Recently used e-mail addresses list.
- In the Subject box, type the information that you
want to appear in the Subject field of the e-mail message.
Note Some Web browsers and e-mail programs
might not recognize the subject line.
- Click OK.
On a data access page, Access adds the hyperlink in
a hyperlink control. In a form or report, it adds the hyperlink in a label.
To test the link on a page, switch to Page view and click the
hyperlink. To test the link in a form or report, right-click the label,
point to Hyperlink on the shortcut menu, and then click Open. Access opens your mail program and creates a new message, with the
address and subject filled in.
Create a new data access page and create a link to the page at the same time
- Open a form, a report, or a data access page in Design view.
- On the Insert menu, click Hyperlink.
- In the Insert Hyperlink dialog box, click Create
new page under Link to.
- In the Text to display box, type the text that you
want to be displayed in the field or text box. If you leave the box blank, Access will use the hyperlink address and/or subaddress as the
display text.
- Click ScreenTip, and type the text that you want to
appear when the user rests the pointer on the hyperlink. If you leave the ScreenTip
text box blank, Access will display the hyperlink address
and/or subaddress as the ScreenTip.
- In the Name of new document box, type a name for the
new page.
Tip
You can create a different type of
document, for example, a Microsoft Word file (.doc) or a Microsoft Excel
spreadsheet (.xls), by typing the three-letter file extension for the type
of file you want to create. However, you can't create a Microsoft Access database
(.mdb) or a Microsoft Access
project (.adp).
- To create a filter (data access page only), click Server Filter. In the Server Filter dialog box, type an expression in the form of a WHERE clause in the Filter criteria for the data access page text box. For example, if you have a data access page that displays order information, including the ID of the salesperson, and you want to link to a second data access page with the employee record about that salesperson, type EmployeeID=[EmployeeID].
- Access creates the new page in the current folder.
To specify a different location, click Change.
- Select an option under When to edit. You can edit the
new page immediately or wait until later.
- Click OK.
Access adds the hyperlink in a hyperlink control
to
the data access page. In a form or report, it adds the hyperlink in a label.
To test the link on a data access page, switch to Page view and
click the hyperlink. To test the link on a form or report, right-click the
label, point to Hyperlink on the shortcut menu, and then click Open.