Publish Access 97 data to the Web


Tip
Access 97 contains built-in HTML Templates and a Publish to the Web Wizard that help you publish a snapshot of your database on the Web. You can also set up a dynamic Web publication that shows the most current data. We don't have room to cover all that, so we'll stick to the fundamentals. You'll learn how to create a simple, static Web page; add graphics; and view the results.
Before we start, here are a few basics. The Publish to the Web Wizard creates Web pages with the HTML file extension. It uses HTML templates, stored in HTM files, that determine which graphics are part of a Web page, whether the pages have numbers, and other options. Access 97 also includes several HTML templates with different background graphics.
To publish your database table directly to the Internet, you must do two things. First, install the Web Post Wizard, which you'll find in the Value Pack that comes with Office 97. Then install Microsoft Internet Explorer (if it's not already installed) and fire it up. You can also use Netscape Navigator.

Create a no-frills Web page

1. Select File--Save as HTML from the Access menu to start the Publish to the Web Wizard. Click Next in the first step.
2. To select an object, click the check box that precedes its icon and name. Click Next to go to the next step. For this example, we chose a single table called Classes (shown in Figure 1), but you can select as many objects as you like. The wizard turns each database, form, or page of a report into a separate Web page.



Figure 1


3. Click Next in the next wizard step without entering the name of an HTML document as a template. This will give you a default page with a grey background.
4. Leave Static HTML selected and click the Next button.
5. Enter the name of the folder where you want to place the HTML file. If you want to create the publication on a local drive and copy it to a Web server later, choose a folder like C:\My Documents. To create a new folder on the fly, click Browse, then click Create New Folder in the Choose a directory dialogue box. After you specify a folder, click Finish. To publish to an Internet server, check one of the options for the Web Post Wizard before you click Finish. The Web Post Wizard copies all the files in the publication folder to an Internet server in case the pages reference graphics or other files, so use a folder reserved for the publication.

Add a background to your page


Figure 2



The Web page C:\SkyClasses\Classes_1 .html is shown in Figure 2. It was created by the Publish to the Web Wizard and has a blue sky background. To add a graphic to your page, follow these steps:
1. Create a new folder to hold your publication. In Figure 2, for example, we used the folder C:\SkyClasses.
2. Copy any graphics files you want to include in your publication to the folder you created in Step 1. The Web page in Figure 2 includes a graphic called msaccess.jpg, copied from C:\Program Files\MS Office\Templates\Access to C:\SkyClasses.
3. Choose File--Save as HTML from the Access menus. Click Next in the first step of the Publish to the Web Wizard, then continue as in Steps 2, 3, 4, and 5 in the previous section, with one exception. In Step 3, you must enter the name of an HTML template: click Browse and select Sky.htm (or whatever template you want to try). By default, Access looks in the directory C:\Program Files\MS Office\Templates\Access for HTML templates. You can create your own templates, but if you are a novice Access user, you'll find the going easier if you modify one of the built-in templates instead.
4. When you're asked what folder to publish to, specify the folder you selected in Step 1. Also, choose one of the Web Post options if you are publishing directly to a Web server. Then click Finish.

View your page in Access

1. If the Web toolbar isn't already visible, right-click the background of any Access toolbar and select Web.
2. In the drop-down box on the right side of the Web toolbar, type the name of the Web page that you want to view and then press <Enter>. The page shown in Figure 2 is C:\SkyClasses\Classes_1.html. (If you viewed the page recently, you can select it by using the drop-down menu.) If you aren't sure what the page is called, click Go on the Web toolbar, choose Open, and click the Browse button in the Open Internet Address dialogue box. Then you can use the Browse dialogue box to locate the page that you want to view.
- Celeste Robinson


Category: Data management, Internet
Issue: Jul 1997
Pages: 177-178

These Web pages are produced by Australian PC World © 1997 IDG Communications