Developer FAQs - Internet

This page contains several FAQs on Accessing the Internet in Access.
The Code segments below can be selected in your browser and copied into an Access VBA module and run. You are free to use any code on this page for personal non-distributed use.


Can I Import or link HTML files so they appear like tables in my Access database?

Now that I can link or attach to HTML tables, can I go further and actually save my database objects (tables, reports, etc.) as HTML documents?

I know I can use IDC and HTX files but creating them can be sometimes confusing. Is there an easier way to create these files with Access 97?

In Access 97 many of the dialog boxes that allow the user to select files or folders have a new item called "Internet Locations (FTP)". Underneath and branching from it is another item called "Add/Modify FTP Locations". What is this?

By using Visual Basic for Application language in Access 97, is there any way to import/export files to the internet?

I know I can save tables and regular queries as htx and idc files, but can I save my parameter queries as such and still have my users prompted for the criteria?

What is Active Server and how do I save my files as Active Server pages?

What is the Hyperlink data type?

I have some Word documents on our LAN that I would like to open without have to use the OLE Automation. Can I use Hyperlinks instead?

Is there another way to save my database objects as html, idc, htx or asp files? I heard that Access 97 comes with a "Publish to the Web" wizard. How can I use it and what does it do?

 

Can I Import or link HTML files so they appear like tables in my Access database?
Keywords: HTML Tables Import Database
Posted Apr 30, 1997

Yes! The recent emergence of HTML as another popular format for distributing data led to the improvements in the Text Import/Export Wizard. In Microsoft Access 97, not only does the Wizard read and import delimited and fixed-width text files, it imports data from HTML tables as well.

A user can simply point at an HTML document containing a table of data and the Import/Export Wizard will read that information and import it directly into a new table, or append the records to an existing one. If there are multiple HTML tables or lists in a single page, Microsoft Access 97 recognizes these and allows the user to select the appropriate one to import. Once the data is imported it becomes native Microsoft Access data, as if it were entered through the Microsoft Access user interface.

Microsoft Access 97 also provides the user with the ability to attach to an HTML table on any Web page. This read-only link makes it easy for users to incorporate the rich data from the Web into their existing Microsoft Access applications.

You can import HTML tables or link them (read only) by using the Get External Data command on the File menu. This will only work on HTML which are located on your local network. You can NOT attach or import HTML files from an FTP site!

Now that I can link or attach to HTML tables, can I go further and actually save my database objects (tables, reports, etc.) as HTML documents?
Keywords: Link HTML Tables Reports Database
Posted Apr 30, 1997

Yes! Users can select to save their static views of their data by using the Save As/Export command on the File menu.

Microsoft Access outputs table, query, and form datasheets, and formatted reports directly to the HTML format. All output in Microsoft Access 97 makes use of the latest HTML specification. The formatting options employed are identical to those chosen for the object inside Microsoft Access 97. Datasheet font color, size, and face are maintained, along with datasheet cell background color and sizing. When outputting reports, Microsoft Access recognizes that reports may consist of more than one page, and create multiple pages of output connected by navigation hyperlinks, allowing the viewer to see the report on the Web as intended.

I want users to to be able to access my database from the Web. I know I can use IDC and HTX files but creating them can be sometimes confusing. Is there an easier way to create these files with Access 97?
Keywords: IDC HTX Database
Posted Apr 30, 1994

Yes! You can now create the necessary HTX and IDC files for any table or query by using the Save As/Export command on the File menu.

The output of static data from a database is extremely useful, especially when the information seldom changes. However, today's users are interested in more than that; they need the ability to publish information from a dynamic datasource, so that users on a Web can return to the same location and always receive the latest information.

Leveraging the Internet Database Connector functionality that is native to Microsoft Internet Information Server and Microsoft Personal Web Server, Microsoft Access 97 provides a easy way for users to share their structured data in a workgroup, or via the Internet.

The user simply has to select the objects they'd like to publish, provide a few basic pieces of information and Microsoft Access 97 does the rest. In seconds, Microsoft Access creates the query file(s) (*.idc) containing information about the view of data to publish, and the template(s) (*.htx) which contains information about how to format the information being returned. Here is the dialog box which prompts you for the information needed to produce the idc and htx files. The minimum information needed is the data source name which you define using the ODBC administrator located in the Control Panel.

In Access 97 many of the dialog boxes that allow the user to select files or folders have a new item called "Internet Locations (FTP)". You see this when you select the "Look in" drop down box. Underneath and branching from it is another item called "Add/Modify FTP Locations". What is this?
Keywords: FTP Look in
Posted Apr 30, 1997

Microsoft Access 97 now allows you to view the contents of FTP sites from the internet as if they were files and folders on your desktop.

To add an FTP site permanently to the list just select the "Add/Modify FTP Locations from the "Look in" drop down box. The following dialog box will appear prompting you for the name of the site, user name and password.

Once the site is Added to the list of FTP sites you can select it and browse the folders and files as if they were on your local hard drive. Also, the newly added FTP site is now accessible by all the other Office 97 applications.

You may wonder what to do with this new found functionality. Microsoft had originally intended users to be able to attach, link, import and export objects to these FTP sites. Imagine being able to link to tables residing on a remote FTP sites!

Unfortunately, there are still serious bugs that prevent its intended use (see knowledge base article Q163624)! For now you will just have to enjoy being a voyeur from Access 97. The good news is that you can Open and Save files from Word97 and Excel 97 to FTP sites.

By using Visual Basic for Application language in Access 97, is there any way to import/export files to the internet?
Keywords: VBA Import Export Internet
Posted Apr 30, 1997

Yes! Although you can't import or export documents via the user interface using the Save As/Export or Get External Data commands on the File menu to an FTP site, you can accomplish the same thing with VBA.

By using the TransferText or TransferSpreadsheet methods of the DoCmd object, users can import/export Text, HTML and Excel Spreadsheets directly to FTP sites. For the "FileName" argument you need to specify the FTP site and file name. If a user name and password are required then the following syntax should be used:

ftp://UserName:Password@name of ftp site/Name of Virtual Directory/FileName

In the following example I am importing an html table from our FTP site into a new Access 97 table called "HTMLTable":

DoCmd.TransferText acImportHTML, , " HTMLTable ", _
"ftp://Marty:CareFree@www.baarns.com/ftptext.html", False, "ftptext"

In the next example I am exporting an Access 97 table called "Employees" to our FTP site as a new HTML document called "Employee.HTML":

DoCmd.TransferText acExportHTML, , "Employees", _
"ftp://Marty: CareFree @www.baarns.com/ Employee.html",False

In this last example I am importing an Excel 97 spreadsheet called "ftptest.xls" from our FTP site into a new Access 97 table called "NewExcelTable":

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97,"NewExcelTable", _
"ftp://Marty: CareFree @www.baarns.com/ftptest.xls",False, "a1:c3"

Unfortunately, you still cannot import/export Access objects (queries, tables, etc.) to an FTP site.

I have an Access database that I want to "Port" to the Web. I have already written queries that prompt the user for criteria, thereby limiting the amount of information returned. I know I can save tables and regular queries as htx and idc files, but can I save my parameter queries as such and still have my users prompted for the criteria?
Keywords: Port Database Query HTX IDC
Posted Apr 30, 1997

Yes! When you use the Save As/Export command on the File menu for a parameter query an additional "*html" file gets created along with the htx and idc files. This file will typically contain an input textbox for users to enter their criteria and a "Run Query" button.

When the users enter their criteria and press "Run Query", that parameter gets passed to the idc file which returns the results in the htx file.

I was told that Access 97 can save Tables, Queries and other Access objects as Active Server pages. What is Active Server and how do I save my files as Active Server pages?
Keywords: Tables Queries Active Server Pages
Posted Apr 30, 1997

Microsoft Active Server Pages comes with Microsoft Internet Information Service 3.0. You can use Active Server Pages (ASP) to embed scripts within your HTML pages to create dynamic, interactive content for your Web site. In the past, scripts written in the popular scripting languages VBScript and JScript have been processed by Web browsers that support the language in which the script was written. Active Server Pages enables your Web server to process VBScript and JScript commands. Any browser that can contact your Web server, regardless of its support for VBScript or JScript, can work with ASP and the dynamic output. The benefit of this is that all the processing is done on the server and NOT on the client! This also allows the developer to use controls and access databases on the server side without having to download controls and large recordsets to the client.

Another part of Active Server is ActiveX Data Objects (ADO), the next evolution of database access technology. ADO's primary benefits are ease of use, high speed, low memory overhead, and a small disk footprint. In ADO, the object hierarchy is de-emphasized. Unlike Data Access Objects (DAO) or Remote Data Objects (RDO), you no longer have to navigate through a hierarchy to create objects because most ADO objects can be independently created. This allows you to create and track only the objects you need. This model also results in fewer ADO objects and thus a smaller working set.

ADO supports key features for building client/server and web-based applications, including the following:

The main benefit of using ASP pages instead of IDC and HTX is that your not downloading the result set from your query to the client and then filling an html form with it. With ASP, the query is run on the server. The resultset is returned to the server where an html page is dynamically created with the result set. The page is then returned to the client.

Using the Save As/Export command on the File menu, you can save your query or table as an ASP file. When doing so your are prompted for the following information.:

Microsoft Access 97 will then create the ASP page, and if your query was a parameter query, it will also produce an html page which will prompt you for the criteria.

What is the Hyperlink data type?
Keywords: Hyperlink Data
Posted Apr 30, 1997

Microsoft Access 97 is one of the first desktop databases to support the storage of hyperlinks as a native datatype. A hyperlink, when clicked, opens the linked Microsoft Office document, or URL address, whether it is located on the World Wide Web, an intranet, corporate LAN, or local machine. The ability to store hyperlinks in a database has many added benefits. An applicant's name stored in a job candidate database for example, now becomes a permanent link to their resume. A supplier's name in a database of product offerings, becomes a link to that supplier's Web site. Both of these scenarios provide the consumer with the option to explore deeper, without requiring the collector of the data to do any additional work except create a single-click hyperlink.

The ability of Microsoft Access 97 to help a user organize and manage data further enhances the value that stored hyperlinks provide. Databases provide a structure in which to store related pieces of information, and the tools necessary to find and manage that data easily. Often however, gathering and entering all the pertinent data is an arduous task. Combining the powerful organizational ability of Microsoft Access 97 with the low-maintenance data collection mechanism that hyperlinks offer makes for the best of both worlds. Hyperlinks provide an easy-to-locate single-click access to relevant data, requiring only minimal data entry.

Supporting hyperlinks as a native datatype has further implications for databases created in Microsoft Access 97. Command buttons with hyperlink properties can now link just as easily to an external Web site as they did to other Microsoft Access forms in previous versions. Labels and images can serve as navigation controls to sources both inside and outside the database itself.

Hyperlinks sound pretty cool but I don't really want to use them to open web sites. Could I use them instead to open forms or reports in my database? Better yet, I have some Word documents on our LAN that I would like to open without have to use the OLE Automation. Can I use Hyperlinks instead?
Keywords: Hyperlink Form Report OLE Automation
Posted Apr 30, 1997

Yes! Adding hyperlinks to a form to open another form or even a Word document is a piece of cake. When your form is in design view, select the Hyperlink command from the Insert menu:

Once selected the following dialog box will appear:

From here, by selecting the lower Browse button, you can select any object in the current database. If you select the upper Browse button, you can select any file on you LAN.

Here I created a hyperlink to Form1 in the current database and a hyperlink to a Word Document on my local LAN:

You can change the colors and display names (caption) of your hyperlinks through the properties dialog box.

Now if I click on the object hyperlink for my form, the form will open. Consequently, if I click on the "Jet Document" hyperlink, that document will open in Microsoft Word.

What a great new way to open documents on your Local Area Network!

Is there another way to save my database objects as html, idc, htx or asp files? I heard that Access 97 comes with a "Publish to the Web" wizard. How can I use it and what does it do?
Keywords: Publish Web Wizard
Posted Apr 30, 1997

The Publish to the Web wizard can be accessed by using the Save As HTML command of the File menu. The Publish to the Web Wizard is a flexible tool that allows users to publish any object in their database either statically or dynamically. It allows for custom HTML formatting using templates and remembers all of the settings used to output the objects in the form of a configuration. The Publish to the Web Wizard integrates with the Microsoft WebPost Wizard to automatically move the published objects to the Web server of choice, whether it is on the Internet or corporate intranet.

The formatting options employed are identical to those chosen for the object inside Microsoft Access 97. Datasheet font color, size, and face are maintained, along with datasheet cell background color and sizing. When outputting reports, Microsoft Access recognizes that reports may consist of more than one page, and create multiple pages of output connected by navigation hyperlinks, allowing the viewer to see the report on the Web as intended.

The Publish to the Web Wizard allows users to publish data in a table, query, form, or report. Data can be published in three formats:

Back to Top


Back Back to the FAQ Table of Contents


  Random Thoughts...
On the other hand, you have different fingers.


Copyright© 1996-1999, Baarns Consulting Group, Inc. - All rights reserved.