Microsoft Office 2000/Visual Basic Programmer's Guide |
You can create either static or dynamic reports for the Web from Access. The following sections outline ways to create either type.
To create a static Web page from Access, you have three options:
DoCmd.TransferText acExportHTML, , "Products", "Products.htm"
DoCmd.OutputTo acOutputTable, "Products", acFormatHTML, _
"Products.htm"
Note Although data access pages may be dynamically linked to a data source, a report snapshot is always a static report, even when it is embedded in a data access page.
To create a dynamic Web page from Access, you can create a data access page. Data access pages combine the features of forms and reports so that you can display data to users and let users interact with data through Microsoft Internet Explorer version 5 or later. (You can also use other Web browsers to display data access pages, but users will not be able to work with the data directly.)
To create a data access page from VBA, use the CreateDataAccessPage method. To programmatically add controls to a data access page, use script or the Dynamic HTML (DHTML) object model to work with the HTML code directly. For more information about building and working with data access pages, see Chapter 5, "Working with Office Applications," and Chapter 12, "Using Web Technologies."