Create a picture or command button that works as a hyperlink

You can use a picture as 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.) on a form, report, or data access page. Although hyperlinks in a report won't work when viewed in Microsoft 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.).

By using a picture

ShowCreate a hyperlink to an existing file or Web page

  1. Open a form, a report, or a data access page in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. On a form or report, click the Image tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.). On a data access page, click the Image Hyperlink tool Button image.
  3. Click where you want to create the picture.
  4. In the Insert Picture dialog box, locate the picture that you want to use, and then click OK.

Access adds an image control (image control: A control that is used to display a picture on a form or report.) to the form or report.

 Note   If you are creating an Image Hyperlink on a data access page, skip to step 6.

  1. On the form or report, make sure that the image control is selected, and then click Properties Button image on the toolbar to open the property sheet for the control.
  2. In the HyperlinkAddress property, click the Build button Button image to open the Insert Hyperlink dialog box.
  3. In the Insert Hyperlink dialog box, click Existing file or Web page under Link to.
  4. 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.
  5. 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/.).
  6. 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   To go to a specific location in an HTML 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. Click 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 test the link on a form or report, right-click the picture, point to Hyperlink on the shortcut menu, and click Open.

To test the link on a page, switch to 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.) and click the picture.

ShowCreate a new data access page and a picture that's a hyperlink to that page

  1. Open a form, a report, or a data access page in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. On a form or report, click the Image tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.). On a page, click the Image Hyperlink tool Button image.
  3. Click where you want to create the picture.
  4. In the Insert Picture dialog box, locate the picture that you want to use, and then click OK.

Access adds an image control to the form or report.

 Note   If you are creating an Image Hyperlink on a data access page, skip to step 6.

  1. On the form or report, make sure that the image control is selected, and then click Properties Button image on the toolbar to open the property sheet for the control.
  2. In the HyperlinkAddress property, click the Build button Button image to open the Insert Hyperlink dialog box.
  3. In the Insert Hyperlink dialog box, click Create new page under Link to.
  4. 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.
  5. In the Name of new document box, type a name for the new data access page.

ShowTip

  1. Access creates the new document in the current folder. To specify a different location, click Change.
  2. Select an option under When to edit. You can edit the new document immediately or wait until later.

To test the link on a form or report, right-click the picture, point to Hyperlink on the shortcut menu, and then click Open.

To test the link on a data access page, switch to 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.) and click the picture.

ShowCreate a hyperlink between two data access pages

  1. Open a data access page in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. Click the Image Hyperlink tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.), and then click where you want to create the picture.
  3. In the Insert Picture dialog box, locate the picture that you want to use, and then click OK.
  4. In the Insert Hyperlink dialog box, click Page in this database under Link to.
  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 as the ScreenTip.
  6. From the list, select the page that you want to link to.
  7. To create a filter for the page, type an expression (expression: Any combination of mathematical or logical operators, constants, functions, and names of fields, controls, and properties that evaluates to a single value. Expressions can perform calculations, manipulate characters, or test data.) 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 box. For example, to open the second page, which displays the records for the employee ID that is shown on the first page, type EmployeeID=[EmployeeID].

Access adds the hyperlink to the data access page. To test the link, switch to 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.) and click the hyperlink. Access opens the target page in your Web browser.

ShowCreate a hyperlink to an object in the current database

  1. Open a form or a report in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. Click the Image tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.), and then click where you want to create the picture.
  3. In the Insert Picture dialog box, locate the picture you want to use, and then click OK.

Access adds an image control to the form or report.

  1. Make sure that the image control is selected, and then click Properties Button image on the toolbar to open the property sheet for the control.
  2. In the HyperlinkAddress property, click the Build button Button image to open the Insert Hyperlink dialog box.
  3. In the Insert Hyperlink dialog box, click Object in this database under Link to.
  4. 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 object name as the ScreenTip.
  5. From the list, select the database object that you want to link to.

To test the link, right-click the picture, 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.

ShowCreate a picture that creates an e-mail message when clicked

  1. Open a form, a report, or a data access page in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. On a form or report, click the Image tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.). On a data access page, click the Image Hyperlink tool Button image.
  3. Click where you want to create the picture.
  4. In the Insert Picture dialog box, locate the picture that you want to use, and then click OK.

Access adds an image control to the form or report.

 Note   If you are creating an Image Hyperlink on a data access page, skip to step 6.

  1. On the form or report, make sure the image control is selected, and then click Properties Button image on the toolbar to open the property sheet for the control.
  2. In the HyperlinkAddress property, click the Build button Button image to open the Insert Hyperlink dialog box.
  3. In the Insert Hyperlink dialog box, click E-mail address under Link to.
  4. 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 e-mail address as the ScreenTip.
  5. 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.
  6. 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.

To test the link in a form or report, right-click the picture, point to Hyperlink on the shortcut menu, and then click Open.

To test the link on a data access page, switch to 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.) and click the picture. Access opens your mail program and creates a new message, with the address and subject filled in.

By using a command button

ShowCreate a hyperlink to an existing file or Web page

  1. Open a form in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. If the Control Wizards tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.) is selected (selected: A toolbar button always has a border around it when it's selected, even when the pointer is not resting on the button.), click it to turn off the Control Wizard.
  3. In the toolbox, click the Command Button tool Button image.
  4. On the form, click where you want to place the command button.
  5. Make sure the command button is selected, and then click Properties Button image on the toolbar to open the property sheet for the command button.
  6. In the HyperlinkAddress property, click the Build button Button image.
  7. In the Insert Hyperlink dialog box, click Existing File or Web Page under Link to.
  8. In the Text to display box, type the display text for the hyperlink. Access automatically displays the value of the command button's Caption property in the box.
  9. Click ScreenTip, and type the text you want to appear when the user rests the mouse pointer on the hyperlink. If you leave the ScreenTip text box blank, Access displays the hyperlink address (and subaddress) as the ScreenTip.
  10. 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/.).
  11. 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   To go to a specific location in an HTML 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. Click 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 test the link, right-click the command button, point to Hyperlink on the shortcut menu, and then click Open.

ShowCreate a new data access page and a command button that's a hyperlink to that page

  1. Open a form in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. If the Control Wizards tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.) is selected (selected: A toolbar button always has a border around it when it's selected, even when the pointer is not resting on the button.), click it to turn off the Control Wizard.
  3. In the toolbox, click the Command Button tool Button image.
  4. On the form, click where you want to place the command button.
  5. Make sure the command button is selected, and then click Properties Button image on the toolbar to open the property sheet for the command button.
  6. In the HyperlinkAddress property, click the Build button Button image.
  7. In the Insert Hyperlink dialog box, click Create New Page under Link to.
  8. In the Text to display box, type the display text for the hyperlink. Access automatically displays the value of the command button's Caption property in the box.
  9. Click ScreenTip, and type the text you want to appear when the user rests the mouse pointer on the hyperlink. If you leave the ScreenTip text box blank, Access displays the hyperlink address as the ScreenTip.
  10. In the Name of new document box, type a name for the page.

ShowTip

  1. Access creates the new page in the current folder. To specify a different location, click Change.
  2. Click an option under When to edit. You can edit the new page immediately or wait until later.

To test the link, right-click the command button, point to Hyperlink on the shortcut menu, and then click Open.

ShowCreate a hyperlink to an object in the current database

  1. Open a form in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. If the Control Wizards tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.) is selected (selected: A toolbar button always has a border around it when it's selected, even when the pointer is not resting on the button.), click it to turn off the Control Wizard.
  3. In the toolbox, click the Command Button tool Button image.
  4. On the form, click where you want to place the command button.
  5. Make sure the command button is selected, and then click Properties Button image on the toolbar to open the property sheet for the command button.
  6. In the HyperlinkAddress property, click the Build button Button image.
  7. In the Insert Hyperlink dialog box, click Object in This Database under Link to.
  8. In the Text to display box, type the display text for the hyperlink. Access automatically displays the value of the command button's Caption property in the box.
  9. Click ScreenTip, and type the text you want to appear when the user rests the mouse pointer on the hyperlink. If you leave the ScreenTip text box blank, Access displays the hyperlink subaddress as the ScreenTip.
  10. Click the database object you want to go to from the list.

To test the link, right-click the command button, 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.

ShowCreate a command button that creates an e-mail message when clicked

  1. Open a form in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  2. If the Control Wizards tool Button image in the toolbox (toolbox: A set of tools that is available in Design view for adding controls to a form or report.) is selected (selected: A toolbar button always has a border around it when it's selected, even when the pointer is not resting on the button.), click it to turn off the Control Wizard.
  3. In the toolbox, click the Command Button tool Button image.
  4. On the form, click where you want to place the command button.
  5. Make sure the command button is selected, and then click Properties Button image on the toolbar to open the property sheet for the command button.
  6. In the HyperlinkAddress property, click the Build button Button image.
  7. In the Insert Hyperlink dialog box, click E-mail Address under Link to.
  8. In the Text to display box, type the display text for the hyperlink. Access automatically displays the value of the command button's Caption property in the box.
  9. Click ScreenTip and type the text you want to appear when the user rests the mouse pointer on the hyperlink. If you leave the ScreenTip text box blank, Access displays the e-mail address as the ScreenTip.
  10. In the E-mail address box, type an e-mail address, or click an address in the Recently used e-mail addresses list.
  11. In the Subject box, type the information 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.

To test the link, right-click the command button, point to Hyperlink on the shortcut menu, and click Open. When you click the hyperlink, Access opens your mail program and creates a new message, with the address and subject filled in.

 
 
Applies to:
Access 2003