I love how on websites you can click to view a map. Somehow the address fields are set to map to a mapping program, such as Google Maps or Mapquest, and you’ll see a map to your destination. You can now replicate this on your Access forms using the Web Browser Control.
First, go to your favorite map site (I found deciphering Map Quest was easier), type in your address (you'll delete this later) and locate it on the map. Copy the URL.
- On the Form Layout Tools|Design ribbon, in the Controls group, select the Web Browser Control, and then click to place it on the form. Access opens the Insert Hyperlink dialog box.
- Paste the URL of the web page into the Address: field of the Insert Hyperlink dialog box, and then press TAB on the keyboard to move to the next field. Access clears the Address: field and separates the URL into the appropriate fields.
- To set the control so that its URL changes based on the data that is displayed on your form, you must replace the appropriate URL components with expressions that refer to the appropriate controls on the form. Here's where having your address helps you locate the correct areas for your fields.
- Click the path or parameter that you want to replace, and then click the Build button.
- In the Expression Builder, double-click the control that contains the data you want.
- Click OK to close the Expression Builder.
- Click OK.