Chapter 11
In This Chapter
Understanding Access 2016 and Office 365 and how they use the web
Creating a web app
Using a web app
Creating and using hyperlinks in Access desktop databases
Access can be a great resource for Internet and intranet information. If the data you’re working with really needs global exposure — or if you simply want to reach your data from anywhere you might be — Access 2016 (and the entire Office suite, for that matter) is ready to help. In fact, a connection to all things web-related has been a priority for Microsoft as each new version of Office has been released over the years, and Office 365 takes that to a whole new level with the suite’s new connection to the cloud.
In this chapter, I explain the Office connection to the cloud and discuss the overall capabilities of Access with regard to the web. Then you’ll find out how to build and use a web app, and finally, how to use hyperlinks within your Access desktop application. The hyperlink section of this chapter applies to the desktop version of Access 2016.
It’s almost a requirement these days that software be web-ready, or at least web-friendly. Even word processors — which should never be used to create a web page — contain “Save for Web” commands, and graphics software can help you create web-ready images.
Of course, Access is a natural fit for the web because data is something we’ve all come to expect to find online. Access makes it easy to both export your data to the web, using External Database Tools, and to build a quick web app (shorthand for “application”) using some handy web app templates or simply uploading your existing desktop database tables.
Office 365 is not the same thing as Office 2016. Office 2016 is just the combined suite of applications — Word, Excel, PowerPoint, Outlook, and Access for the desktop computer. Office 365 is a subscription-based set of tools that enables companies to collaborate and share their data online. Most Office 365 subscriptions come with all the desktop office applications but not the other way around.
Microsoft offers a variety of monthly fee-based plans for businesses of all shapes and sizes, providing a variety of options. As of this writing, the prices for Office for Business range from $5 to $12.50 a month. You can investigate these plans by searching the web for “compare office 365 plans” and choosing the right plan for you.
Now, this is not to say that you have to use Office 365, because you absolutely do not. You can use Office 2016’s applications without setting foot on the cloud, and install the applications locally. You don’t need to put your Office data (documents, worksheets, presentations, and so on) in the cloud if you don’t want to. You can store your data locally, just as you always have. In fact, everything done in this book was done with a locally installed copy of Access 2016.
When it comes to Office 365, the cloud also provides online versions of your software, meaning that you can work with most of the Office applications online, instead of from locally installed copies. This is where the fee-based subscription plans come into play — along with sharing options for online collaboration with coworkers and clients anywhere in the world. Office 365 makes it easy to collaborate on and share a Word document or Excel spreadsheet. Oddly, Access is not one of those applications with a companion online version. Access does make use of the web, however, as you’ll soon see.
As mentioned earlier, you can host your web app on a local SharePoint site or on an Office 365 SharePoint site in the cloud. If you’re using SharePoint locally, make sure you have administrative rights and the URL to the SharePoint site. I have an Office 365 business subscription so I’ll use that to create my web app. To begin, connect Access 2016 to your Office 365 account.
Click Sign in to get the most out of Office near the right end of the screen (see Figure 11-1).
The Sign in dialog box appears.
Type the password associated with the account and click Sign in.
You’ll see the name associated with the account at the right end of the Ribbon in place of the words Sign In. Now you’re ready to create your web app.
So what is a web app anyway? Well, web means it’s online, and app is just shorthand for “application.” A Custom Web App is an online database application accessed from the cloud using a browser. You build and maintain the web app in the desktop version of Access but use it in a browser. This makes your Access data available to almost any device that has an Internet connection such as a smartphone or tablet.
You can also upload existing tables to a web app from sources such as Access and Excel to name a few. If you’re starting from scratch, Access comes with several web app templates that make it easy to build a web app. Table 11-1 show the available templates with the descriptions provided by Microsoft:
Table 11-1 Web App Templates
Template Name |
Description |
|
Track important equipment used by your business and assign it to employees. |
|
Manage individual and corporate relationships for your business by using this application. |
|
Record issues related to your business, associate them with customers, and assign them to employees. |
|
Manage projects by breaking work items into tasks, associating them with customers, and assigning them to employees. |
|
Plan and manage tasks, and then assign them to employees. |
To create a web app, follow these steps:
Click the Custom Web App button (it’s rather large, so you can’t miss it).
The dialog box in Figure 11-3 opens, through which you can name your app and choose where to store it online. Note that just below the Web Location box is a link that says Get Help Finding Your Web Location, which takes you to a website (shown in Figure 11-4) that provides options for you to use if you choose to continue developing your web app.
Select or enter the URL for the site that will host the web app.
Office 365 sites are listed in the Available Locations list box. If you’re using a local SharePoint site, type its URL in the SharePoint or Office 365 site URL.
Once you’ve found your template, click Create.
Access builds a web app based on the template you selected and the Add Tables tab appears. You’re now ready to add other tables to your web app beyond the one created with your template selection.
Access provides a handy list of table designs for you to choose from if you’re starting your web app from scratch.
Here’s how to add a table:
Type a keyword in the search box that represents the type of data to go into your table.
For example, type contacts for contact-related tables or order for customer- and order-related tables.
Click search (the magnifying glass icon).
Access displays a list of related tables (see Figure 11-6).
Select a table.
Access creates the table. The table name appears down the left side of the screen.
Access gives you the ability to upload a data table from an existing source such as an Access desktop database, an Excel spreadsheet, or text file. Follow these steps to upload an existing Access table. Steps for other file formats are similar.
Click Access from the Create a table from an existing data source list (Figure 11-7).
The Get External Data dialog box appears, ready to serve.
Click Open.
The path and file name are entered in the File name text box in the Get External Data dialog box.
Click OK.
The Import Objects dialog box appears.
Select the table name and click OK.
The table and its data are imported into the web app.
Click Close.
The imported table appears down the left side of the web app screen.
Web app tables are maintained just like Access desktop database tables. Just open the Navigation Pane (F11), right-click the table, and choose Design View. If you read Chapters 4 and 5 (and I know you did!), you already know all about editing and designing Access tables.
When you create a web app table, Access is such a great pal that it also creates two views for you. While a bit confusing, it’s not quite the same as the views you are familiar with in desktop Access such as Design view and Datasheet view. A view, in this context, is a way for you to see and edit data in a table similar to a form in the desktop version of Access. In fact, Access classifies these views as forms in the Navigation Pane (see Figure 11-8). Unlike tables, though, views do not look like desktop Access forms. They’re actually web pages.
The first view Access creates is called List view. It displays table data one record at a time. The second view is called Datasheet view. Sound familiar? It’s just like desktop Access’s Datasheet view. It displays table data in a spreadsheet-like format.
Unlike desktop Access, in a web app, you can’t see data in Datasheet or List view from the Navigation pane. To see data in the view, you must open it in a web browser (see the next section, “Launching your Web App in a Browser”).
When you’ve created your tables and Access has created the corresponding views (remember your pal Access does that for you!), it’s time to take a look at the web app in a browser. When you launch your app, you’ll see the tables you created or uploaded listed down the left side of the screen (Figure 11-9). When you click a table name, the data from that table opens in List view ready for data entry. Records are listed down the left side of the view. When you click on a record, you’ll see the data from that record on the right side of the view. You can change to Datasheet view by clicking (oddly enough) the Datasheet link at the top left of the form.
Each form has a series of command buttons across its top called an Action Bar. By default, the Action Bar has buttons for common record management actions. Figure 11-10 shows you the Action Bar buttons with an explanation of what each does.
Data entry in the browser is very similar to data entry in desktop Access. The two major differences are you must click a button to edit a record and another to save it. Don’t worry though: If you forget to click Save and then try to move to another record, Access prompts you to save. Access and you, perfect together! Here’s how to launch your web app:
Click the Launch App icon (Figure 11-11) in the View group of the Ribbon.
Your browser opens showing your web app.
Once you’ve launched your web app, List and Datasheet views give you two different ways to add a new record. List view is best if your table contains many fields and you don’t like scrolling. Datasheet view, as you can probably guess, is best if your table contains a small number of fields (generally, less than fifteen) and you do like scrolling! Once you’ve launched your app, follow these steps in either view to add a new record:
Click the name of the table to which you’d like to add data.
The table opens in List view displaying the first record in the table. Click Datasheet if you want to add your records in a datasheet. Remember, tables are listed down the left side of the screen and have star symbols next to them.
Click the Add icon (+) on the Action Bar to move to a new record.
The form moves to a new record and the cursor is placed in the first field.
Click the Save icon (disk) on the Action Bar.
The record is saved. You must click the Save icon in a web app to save data, unlike desktop Access where records are saved automatically when you change records or close a form. Don’t panic though, if you forget to click Save and change records or views in your web app, Access will prompt you.
Once you’ve launched your web app, List and Datasheet views give you two different ways to edit data. List view has a filter feature, making it easy to find a record. Datasheet view assumes you’ll scroll through the data or use your browser’s Find command (Ctrl+F in most browsers) to locate the record in question. List view requires the click of an icon to switch to edit mode. Datasheet view is already in edit mode.
Here’s how to edit a record in List view. The steps for Datasheet view are similar.
Click the table name that contains the record you’d like to edit.
The table opens in List view. Remember, tables are listed down the left side of the screen and have star symbols next to them.
Tap the Enter key on your keyboard.
The form filters to the record or records with your keyword (Figure 11-12). If the keyword matches multiple records, you’ll see the data from the first field for each record listed down the left side of the form. Click that data to switch to the desired record.
Click the Edit icon (pencil) on the Action Bar.
The form switches to edit mode. Datasheet view doesn’t have an Edit icon. Just click in the field you’d like to edit and type away!
Once you’ve launched your web app, steps for deleting a record are identical regardless of view.
Click the table name that contains the record you’d like to delete.
The table opens in List view.Tables are listed down the left side of the screen and have star symbols next to them.
Click the Delete icon (trash can) on the Action Bar.
You’re asked to confirm the deletion.
It is possible to connect to web app tables located in the cloud or your locally hosted SharePoint site from your desktop database. This means your data is in one place (cloud or local SharePoint site) and you’ll use two different applications to access it – the web app and the desktop database. This is an advanced topic beyond the scope of this book. However, this is a very important piece of information to know before planning and building your database. If you’re like me, you’ll want your data in one place (in the cloud) and the ability to connect to it from multiple sources — your desktop database and your web app via a browser.
This means you can have people in the office in the desktop version of your database and out of the office using your web app editing the same data. All you need is an Internet connection (easy) and a well-designed database and web app (not quite as easy, but you can do it!). If you want to know how to do this, search the Internet for “How to make external connections to an Access web app.”
If you don’t need your data to sit in the cloud via a web app, you can connect your desktop database to the outside world. The term hyperlink is probably quite familiar — it’s the text or pictures that serve as jumping-off points to other data. Click a hyperlink, and you go to another web page. Click an image that’s set up as a hyperlink (your mouse pointer turns to a pointing finger), and you go to a larger version of the image — or to another website where information pertaining to the subject of the image can be found. Underlined text (or text in a different color or that changes color when you point to it) is the typical sign of the existence of a hyperlink.
So what’s this hyperlink stuff? Although hyperlink makes it sound like a link that’s had way too much coffee, within the context of Microsoft Office (of which Access is a part), it’s actually a special storage compartment for storing the address of a resource on either the Internet or your local corporate network (or a file stored on your local computer). Hyperlinks start with a special identification code that explains to the computer what kind of resource it’s pointing to and where that resource is.
Table 11-2 lists the most common protocol codes (a harmless but scary-sounding term that simply refers to portions of the programming code that allow a browser to use a hyperlink). You’ll find, along with the code itself, an explanation of the kind of resource the code refers to.
Table 11-2 Types of Hyperlink Protocol Codes in Access
Protocol Code |
What It Does |
|
Opens a local or network-based file. |
|
File Transfer Protocol; links to an FTP server. |
|
Hypertext Transfer Protocol; links to a web page. |
|
Sends email to a network or Internet address. |
|
Opens an Internet newsgroup. |
If you surf the web regularly, many of these terms and concepts should be familiar. Although most of them are geared to Internet or intranet applications, Access can also use hyperlinks to identify locally stored documents (that’s what file://
does). This enables you, for example, to create a hyperlink in your Access table that opens a Word document, an Excel spreadsheet, or a JPEG image file. This technology is so flexible that the sky’s literally the limit.
Access provides a handy field type specifically designed for this special type of data. As you probably guessed, this type is called the Hyperlink field.
Adding a Hyperlink
field to a table doesn’t require special steps. Just use the same steps for adding any field to a table — get to Design view for your table and use the Data Type column to choose the Hyperlink data type, as shown in Figure 11-13.
The Hyperlink data type is no different from the other field types in terms of applying it. When you hop back to Datasheet view, you’ll see that your entries (if any) in the Hyperlink
field are underlined, looking just like link text on a web page.
Once you’ve created your hyperlink field, enter your hyperlinks into the field with the Edit Hyperlink menu. Follow these steps to enter a hyperlink:
Choose Hyperlink and then select Edit Hyperlink from the pop-up menu, shown in Figure 11-14.
The nifty little dialog box shown in Figure 11-15 appears.
Click OK.
Your hyperlink is edited, showing the text you choose to display and pointing to the web address (document or other file) that you designate. If you choose to create a ScreenTip, you can test the new tip in Datasheet view by mousing over your hyperlink and seeing what appears.
Pretty neat, huh? Experiment with the dialog box a little to find out how everything works. It takes only a moment.
Hyperlinks in your table work just like the ones you find on the web — just point and click. You can double-check for yourself by doing the following:
Make sure you’re connected to your network and the Internet.
Although Internet Explorer (or whichever browser you’re using) will open whenever a hyperlink that points to a website is clicked, if you’re not online at the time, it won’t go where the hyperlink points.
Open the table containing hyperlinks.
The fun is about to begin!