| | Product Information Help and How-to Training Templates Support and Feedback Technical Resources Additional Resources | Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.
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, report, or data access page. Labels may or may not be attached to another 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 (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
- 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 (Datasheet view: A window that displays data from a table, form, query, view, or stored procedure in a row-and-column format. In Datasheet view, you can edit fields, add and delete data, and search for data.) or Form view (Form view: A window that displays a form to show or accept data. Form view is the primary means of adding and modifying data in tables. You can also change the design of a form in this view.).
- In a data access page (data access page: A Web page, published from Access, that has a connection to a database. In a data access page, you can view, add to, edit, and manipulate the data stored in the database. A page can also include data from other sources, such as Excel.), 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 (ScreenTips: Notes that appear on the screen to provide information about a toolbar button, tracked change, or comment, or to display a footnote or endnote. ScreenTips also display the text that will appear if you choose to insert a date or AutoText entry.) 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 (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 Internet Explorer 5.0 or later.).
- 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.
- 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 (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].
- 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 (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/.).
- 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.
- 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].
- 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.
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 (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.
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 (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.
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) (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.) or a Microsoft Access project (.adp) (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.).
- 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].
- 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 (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.
|