Using AutoPage to Create Columnar DAP

Access 2003's AutoPage feature generates a simple DAP from tables or queries. If all you need is a simple page that displays one record at a time, AutoPage is the fastest approach. To test the AutoPage feature, do the following:

  1. graphics/open_desigh_view.gif Click the Database window's Pages shortcut, if necessary, and click the New button to open the New Data Access Page dialog.

  2. Select AutoPage: Columnar in the list and select a table or query in the drop-down list. This example uses the Quarterly Orders by Product query (see Figure 24.22).

    Figure 24.22. The New Data Access Page dialog offers choices similar to those of the New Form dialog.

    graphics/24fig22.gif

  3. Click OK to generate the page. After a second or two, depending on the speed of your PC, the page opens in Page view without a title (see Figure 24.23). If you specified a default theme when testing the Page Wizard, the default theme is applied automatically to your page.

    Figure 24.23. The AutoPage: Columnar choice generates a simple page with a single navigation control for the table or query that you select.

    graphics/24fig23.gif

    Note

    The Quarterly Orders by Product page is read-only because its underlying summary query is read-only. All queries that return aggregate values, such as Jet crosstab queries, are read-only.

  4. Save the page as QuarterlyOrdersByProduct.htm in your working folder, and acknowledge the warning message.

Note

Microsoft's sample DAP have filenames that include spaces. Spaces in production Web page filenames are uncommon and can cause problems with some Web servers and browsers. DAP require IE 5+ for viewing and usually run from a Microsoft Web server, so spaces in file names aren't fatal. It's a good HTML programming practice, however, to remove spaces or other nonstandard punctuation (except hyphens) from .htm file names.


graphics/access_2002_new_icon.gif

Field labels in Access 2003 DAP display the caption of the underlying table; Access 2000 uses field names for the caption. The Product Name and Customer labels use the Caption property and don't have added colons. The remaining fields are query column names (without Caption property values) and have colons. The reason for omitting colons from Caption-based labels is a mystery.

Note

graphics/access_2002_new_icon.gif

The Quarterly Orders by Product query displays the CompanyName field of the Customers table in the Customer column of Datasheet view, but not in the Customer field of your AutoPage. Customer is a lookup field; lookup fields don't propagate to pages that you create with the Page Wizard or AutoPage feature. When you drag lookup fields from the Field List to a section, however, a lookup field substitutes a drop-down list for the standard text box. Access 2002 introduced automatic support for lookup fields by DAP.




Special Edition Using Microsoft Office Access 2003
Special Edition Using Microsoft Office Access 2003
ISBN: 0789729520
EAN: 2147483647
Year: 2005
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net