Join Adam Wilbert for an in-depth discussion in this video Linking to external content, part of Access 2013: Forms and Reports.
- The hyperlink and web browser controls allow your database to reach out beyond your local computer and out onto the web. You can use the hyperlink control to open a website or embed online content right there, inside of your database. Let's take a look at how we can use hyperlinks and web browser controls by modifying our Controls form that we set up earlier. I'll right-click on it and go straight into Design View. The hyperlink control is this one here, with the globe and the chain icon. When I click on it, the Insert Hyperlink window opens up. We have buttons over here that'll help us establish links to various items.
For instance, if I click on Existing File or Web Page, we can look in the current folder to find a file we wanna link to. We can click on Browse Pages to find pages or websites we can go to. Or Recent Files, here. Let's use Current Folder and create a link to the KinetEco Mission Statement, which is in the Chapter 3 folder. Go 'head and say OK, and access adds that link here onto our form. To test it out, we'll switch into Form View and we'll click on the link. Now, we're gonna get a security warning here, so just go 'head and say Yes, and the Word document opens up, right inside of Word.
We can make our edits and save changes here. Let's go ahead and close this down and return to Access. I'll switch back into Design View, and we'll take a look at another hyperlink. I can also make links to objects in this database. So instead of using navigation buttons, we can provide simple hyperlink. For instance, if I want to link to my Customers table, I'll just click in here to Tables and choose the Customer table here. Go ahead and say OK. And we'll try out that link. We'll switch into Form View and click on this Customers link here. And sure enough, it opens right to the Customers table.
Let's go 'head and close that down, and once again, we'll return to Design View. One more time, we'll add another hyperlink control. And this time, we can link to an email address. Up here, I'm gonna type in some different text. Let's go ahead and type in email database administrator. Down here, we can establish the email address is firstname.lastname@example.org, and we can establish a subject line here. I'm just gonna type in help with database. Let's go ahead and say OK. And that link is added to our form. If we try it out, I'll click on it, and it should open up my default email program, which, for me, is Outlook.
You can see that it's already identified the email address, here, and it's pre-populated the subject line here. Let's go ahead and close this down. And I'm not gonna save any changes to the email. And we'll return back to Design View here. Let's add another hyperlink control here. This time, I wanna go to Hyperlink Builder. I'll go ahead and click on this button down here in the Insert Hyperlink window. For the Text to display, I'm gonna say, "Go to KinetEco website". The address is gonna be http://www.kinetecoinc.com. I'll go ahead and press Enter, and that link'll be created and added to my form.
Let's go ahead and move this down. For some reason, it applied it on top of the other ones. And I'll go ahead and switch my view and test it out. When I do that, it opens up my default web browser and goes straight to that homepage. Let's go ahead and go back into Access, and we'll try out the web browser control. One more time, I'm gonna go into Design View, and I'm gonna select all these links here that we just created, and delete them off the screen. The web browser control is this one right next to the hyperlink control. It's got a box with a globe inside of it. Let's go ahead and click that, and then we'll come down here, and I'll drag out a box.
Here, we can embed web content right inside of our form, rather than linking to it in our default browser. Once again, I'm gonna type in the same address to the KinetEco homepage. That's http://www.kinetecoinc.com. We can go ahead and click off of it to apply that change. And then go ahead and say OK. And it adds a link over here, into our web browser control. Now, we need to make sure that this is sized appropriately for our web page. Most web pages work out pretty well with the size of 960 pixels wide.
So let's go 'head and make our web browser control that width. I'm gonna make sure that it's selected and go over here to the Format tab. And under Width, I'm gonna go 'head and type in 960 px, to specify pixels. When I press Enter, it makes that change, and my web browser control is now wider. Let's go ahead and check it out. We'll switch our view, and the web browser control loads with the web page right here inside of the form, inside of Access. I can browse through it just like any normal web page. Now let me show you one other use that we can use for the web browser control. And go back into Design View.
I'm gonna select the one we have already made, and I'm gonna delete it here. Let's go ahead and add one more. I'll click up here on the web browser control, and I'll click, and I'll drag out another box. This time, we can link directly to embedded media, such as a YouTube video or some other sort of media file. And we can use the web browser control to embed other media files, besides just websites. For instance, I'm gonna switch over here and go to a YouTube page that I've already loaded up. This is a file from the KinetEco PSA, or public service announcement. - It's happening all over the world. Everyday, people are harnessing the power of the sun, and it's literally lighting up their lives.
- So this is a video that I want to embed, directly inside of my form. In order to do that, what I wanna do is scroll down here in YouTube and find this button here that says Share. I'll go 'head and click on it and then change to this Embed option here. Now, the piece that I need is just the URL, which starts right here, after src=", and I'm gonna grab the two slashes the www.youtube part, embed, and then this little tag here, all the way to the next quotation mark. Let's go ahead and copy that.
I'll press control, c, on my keyboard. And then we'll switch back into Access. Next, I'm gonna come over here to the Address of the Insert Hyperlink window, and I'm gonna press control, v, to paste that in. That'll paste in the link to the YouTube video. Go ahead and press Enter to apply that change. And we can check it out. Let's go ahead and switch our view here. And after just a moment, the YouTube video loads right inside of our form. I can even play it. - It's happening all over the world. - So there's our KinetEco PSA, directly in the form, right inside of Access, without having to go out to the web.
Bringing in content from the web can be a great way to add dynamic content to your database. Without having to store anything, training or marketing documents, customer testimonial videos, specs on products, and all kinds of information can be made available right within your database, so that it's easy to get to when you need it.
Then the course dives into reports: creating efficient and readable layouts, grouping data into categories, tying reports to queries, and using conditional formatting rules to highlight key takeaways from the data. Finally, Adam demonstrates how to link forms and reports together and print your results, and introduces unique ways to save time filling out paperwork and generating form letters.
- Creating forms with the Form Wizard
- Aligning form controls
- Adding buttons, links, and attachments to forms and reports
- Building database navigation elements
- Grouping and sorting data in reports
- Building reports from queries or wizards
- Calculating fields
- Linking forms and reports
- Printing and exporting reports