Data Access Pages Revisited

The objective of DAP is to provide a means of quickly authoring interactive, data-bound Web pages with little or no programming. DAP rely on the OWC's Data Source Control (DSC) to bind other ActiveX Control objects on a page to a Jet or SQL Server database. DAP use a combination of XML, Dynamic HTML (DHTML), and Cascading Style Sheets (CSS) to generate Web pages that permit users to view and update data. IE 5.0+ is required to display DAP; when you open a page in Access 2003, IE's rendering engine displays the content from the page's .htm file.

Access 2000 introduced DAP version 1.0, which most Access developers agree wasn't "fully cooked" when released. DAP version 1.0 suffered from the following shortcomings:

  • A clunky design surface made creating attractive DAP very difficult. Aligning controls wasn't easy, and multi-select for controls and table fields wasn't available. As mentioned earlier in the chapter, DAP 1.0 didn't include an undo feature.

  • Displaying DAP in client browsers required a license for Office 2000 because Microsoft designated the OWCs as Office products, not redistributable ActiveX Controls. This restriction limited deployment of DAP to corporate intranets with client PCs having Office 2000 installed or, if not installed, an Office 2000 license for the user.

  • Unlike Web pages generated by exporting tables, queries, and reports to Run-from-Server ASP, DAP aren't browser-independent. Organizations that standardize on Netscape or Opera browsers, for example, can't deploy DAP.

Access 2003 overcomes most DAP 1.0 problems except for the browser issue, which loses significance as Microsoft increases IE's share of the Web browser market.

Save as Data Access Page

The capability to save Access table, query, form, and report objects to DAP was one of Access 2002's more important new features. It's much easier for new and seasoned Access developers to build forms and reports in Access's traditional Design view than in DAP Design view. DAP don't have counterparts for all native Access form and report controls, and DAP use VBScript, not VBA, in event-handling procedures. Only very simple forms and reports save intact to DAP. Tables convert quickly to pages, which emulate Access datasheets and let users update table data in the browser. Queries also transform to datasheet-style pages; the page is updatable if the underlying query permits updates.

Following are the primary limitations when exporting Access form and report objects to DAP:

  • Subforms and subreports aren't exported. The converter ignores these objects.

  • Tab controls in forms aren't supported.

  • Combo boxes and list boxes are limited to two bound columns, the second of which displays. The converter ignores additional columns. This is an HTML limitation; HTML drop-down lists and list boxes can display only a single column.

  • Control sources that include references with Forms! expressions don't convert.

  • Input masks and validation functions aren't included, but you can script the validation process with DHTML.

  • Subtotals and other aggregate values displayed by text boxes in report Header and Footer sections don't convert, but the workaround to add subtotals isn't difficult.

Chapter 25, "Converting Access Objects to Data Access Pages," shows you how to overcome most of the limitations you encounter when saving reports as DAP. Figure 1.16 shows part of the Inventory By Category report saved as the Inventory.htm data access page.

Figure 1.16. This conventional Access report saved as a Data Access Page requires several post-conversion modifications to display aggregate values (category units and value subtotals) in the Detail section's footer. Other design changes such as removal of record navigation controls make the page more attractive and usable.

graphics/01fig16.gif

Office Web Components Licensing

Version 11 of the OWCs are freely distributable, that is, you can include the OWCs in a runtime Access application that you create with MOD 11's Package and Deployment Wizard. Microsoft provides an OWC merge module to add OWCs to the Windows Installer package for runtime applications. A warning page greets DAP recipients who don't have OWC version 11 with an option to download the OWC installer package from the location of your original Office 2003 installation or the microsoft.com Web site. As mentioned earlier in the chapter, OWC11 installs only on computers running Windows XP/2000+.

There are no restrictions to the Data Source Control OWC for DAP recipients without an Office 2003 license, but the unlicensed PivotTable, PivotChart, and Spreadsheet controls have the following limitations:

  • Users can't drag and drop fields to pivot the table in the UI.

  • Filtering with the UI isn't permitted.

  • Design changes to PivotCharts, such as changing the chart type, aren't supported.

  • Spreadsheet objects are read-only.

Note

If you're an accomplished VBScript programmer, you can add script to your pages to manipulate the unlicensed PivotTable, PivotChart, and Spreadsheet controls.


Microsoft's OWC licensing policy is intended to extend the reach of DAP to a much larger audience than Office 2003 users, but the Windows XP/2000+ installation restriction compromises that objective.

New DAP Design View Features

graphics/2002_icon.gif

Access 2002 addressed the deficiencies of Access 2000's Page Design view by adding the following features:

  • graphics/undo.gif graphics/redo.gif Multi-level redo and undo applies to most design changes.

  • Multi-select for controls lets you apply size, horizontal and vertical spacing, alignment, and other property settings to a group of controls.

  • Multi-select drag and drop lets you drag a group of fields from the field list to the page.

  • graphics/properties_window.gif Banded pages are updatable if the query is updatable. The AllowAdditions, AllowDeletions, and AllowEdits group-level properties determine users' ability to update data. Auto-indent for group levels is provided, and you can specify common formatting for captions and footers in the Pages page of the Options dialog.

  • graphics/auto_sum.gif AutoSum lets you add a grand total, subtotal, average, count, or other aggregate value to the section above the detail records. Figure 1.17 shows the Northwind.mdb's Review Orders page. The page has an AutoSum text box in the Header: Orders-OrderDate section that displays a grand total of the ExtendedPrice field of the Order Details Extended query. The Grand Total value is the sum of the Sub Total values for each order received during the specified Order Year.

    Figure 1.17. The Review Orders page illustrates use of the AutoSum feature to add a Sub Total value for each record in the Detail section and a Grand Total in the header for the Order Year. Data in the text boxes and drop-down lists is updatable.

    graphics/01fig17.gif

  • Context menus let you choose Page, Group Level, Section, or Element properties by right-clicking any region on the page. The context menu also has Clipboard, formatting, and Group Filter choices.

  • Tabular, PivotChart, and Office Spreadsheet options have been added to the Page Wizard, which automatically generates the basic DAP design you select. You now can bind the Spreadsheet OWC to a table or query.

  • Batch update features are available for DAP based on SQL Server 2000 data sources.

  • Offline access to static and updatable pages is provided by local XML data storage and, for updatable pages, SQL Server merge publication. Updatable pages require MSDE on the client and publication enabled on the remote server. The Access 2000 Replication dialog is missing in Access 2002, so you must configure publication with OSQL.

  • Default locations for the deployment folder and the Office Data Connection (ODC) or Universal Data Link (UDL) files for new DAP are set in the Pages page of the Options dialog.

  • Hyperlink controls now bind to Jet Hyperlink fields. SQL Server doesn't support Hyperlink fields, so this feature isn't available in DAP bound to SQL Server data sources.



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