Create a hyperlink

When you create a hyperlink (hyperlink: Colored and underlined text or a graphic that you click to go to a file, a location in a file, a Web page on the World Wide Web, or a Web page on an intranet. Hyperlinks can also go to newsgroups and to Gopher, Telnet, and FTP sites.) by using any of the following methods, Microsoft Access creates a label control (label: A control that displays descriptive text, such as a title, a caption, or instructions, on a form or report. Labels may or may not be attached to another control.) on the form or report.

 Tip    Try Office 2010 In Access 2010, in addition to adding hyperlinks, you can also add live web content to a form. Read an article or try Office 2010!

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 (HTML: The standard markup language used for documents on the World Wide Web. HTML uses tags to indicate how Web browsers should display page elements such as text and graphics and how to respond to user actions.).

 Notes 

The ScreenTip (ScreenTip: A short description that appears when the user holds the mouse pointer over an object, such as a button or hyperlink.) 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.

ShowType a hyperlink in a field or text box

  1. Open the table, query, or form in Datasheet view, the form in Form view, or the data access page in Page view (Page view: An Access window in which you can browse the contents of a data access page. Pages have the same functionality in Page view as in Microsoft Internet Explorer 5.0 or later.).
  2. Place the insertion point in the hyperlink field (hyperlink field: A field that stores hyperlink addresses. In an Access database (.mdb), it's a field with a Hyperlink data type. In an Access project (.adp), it's a field that has the IsHyperlink property set to True.) in the datasheet or in the text box or other control that accepts hyperlinks on the form or data access page.
  3. 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.

ShowPaste a hyperlink from a Microsoft Office document

  1. Open an Office document that contains a hyperlink.
  2. 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.

  1. Switch to Access and open a form or report in Design view.
  2. 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.

ShowLink to text in a Microsoft Office document

  1. 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.

  1. Select the text you want to link to.
  2. On the Edit menu, click Copy.
  3. Switch to Access and open a form or report in Design view.
  4. 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.

ShowDrag an Internet shortcut to a form or report

  1. Open a form in Design view or a report in Design view.
  2. Locate the desired Internet shortcut (such as an icon on your desktop).
  3. Select the Internet shortcut.
  4. 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.

ShowCreate a hyperlink between data access pages in the current database

  1. Open a data access page in Design view.
  2. On the Insert menu, click Hyperlink.
  3. In the Insert Hyperlink dialog box, click Page in this database under Link to.
  4. 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.
  5. 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.
  6. From the list, select the data access page you want to link to.
  7. 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 (WHERE clause: The part of an SQL statement that specifies which records to retrieve.) 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].
  8. 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.

ShowCreate a link to an existing file or Web page

  1. Open a form, a report, or a data access page in Design view.
  2. On the Insert menu, click Hyperlink.
  3. In the Insert Hyperlink dialog box, click Existing file or Web page under Link to.
  4. 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.
  5. 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.
  6. In the Address box, type a path or a URL (Uniform Resource Locator (URL): An address that specifies a protocol (such as HTTP or FTP) and a location of an object, document, World Wide Web page, or other destination on the Internet or an intranet, for example: http://www.microsoft.com/.).
  7. 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 (HTML: The standard markup language used for documents on the World Wide Web. HTML uses tags to indicate how Web browsers should display page elements such as text and graphics and how to respond to user actions.) file or to an object in the current Microsoft Access database (database: A collection of data related to a particular subject or purpose. Within a database, information about a particular entity, such as an employee or order, is categorized into tables, records, and fields.) (.mdb) or Microsoft Access project (Microsoft Access project: An Access file that connects to a Microsoft SQL Server database and is used to create client/server applications. A project file doesn't contain any data or data-definition-based objects, such as tables and views.) (.adp). Click Bookmark, select the bookmark (Bookmark: A property of a Recordset object or a form that contains a binary string identifying the current record.) or object you want in the list, and then click OK.

  1. 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 (WHERE clause: The part of an SQL statement that specifies which records to retrieve.) 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].
  2. Click OK in the Insert Hyperlink box.

On a data access page, Access adds the hyperlink in a hyperlink control (hyperlink image control: A control that is used on a data access page to display an unbound image that represents a hyperlink to a file or Web page. In Browse mode, you can click the image to go to the target location.). 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.

ShowCreate a link to a table, query, form, report, or data access page

  1. Open a form or a report in Design view.
  2. Click Insert Hyperlink Button image on the toolbar.
  3. In the Insert Hyperlink dialog box, click Object in this database under Link to.
  4. 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.
  5. 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.
  6. From the list, select the database object that you want to link to.
  7. 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 (Bookmark: A property of a Recordset object or a form that contains a binary string identifying the current record.) to list the objects within that database.

ShowCreate a link that opens your e-mail program and creates a message addressed to the specified e-mail address

  1. Open a form, a report, or a data access page in Design view.
  2. On the Insert menu, click Hyperlink.
  3. In the Insert Hyperlink dialog box, click E-mail address under Link to.
  4. 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.
  5. 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.
  6. 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.
  7. 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.

  1. Click OK.

On a data access page, Access adds the hyperlink in a hyperlink control (hyperlink image control: A control that is used on a data access page to display an unbound image that represents a hyperlink to a file or Web page. In Browse mode, you can click the image to go to the target location.). 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.

ShowCreate a new data access page and create a link to the page at the same time

  1. Open a form, a report, or a data access page in Design view.
  2. On the Insert menu, click Hyperlink.
  3. In the Insert Hyperlink dialog box, click Create new page under Link to.
  4. 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.
  5. 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.
  6. In the Name of new document box, type a name for the new page.

ShowTip

  1. 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 (WHERE clause: The part of an SQL statement that specifies which records to retrieve.) 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].
  2. Access creates the new page in the current folder. To specify a different location, click Change.
  3. Select an option under When to edit. You can edit the new page immediately or wait until later.
  4. Click OK.

Access adds the hyperlink in a hyperlink control (hyperlink image control: A control that is used on a data access page to display an unbound image that represents a hyperlink to a file or Web page. In Browse mode, you can click the image to go to the target location.) 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.

 
 
Applies to:
Access 2003