Saving Forms as DAP

The ReportML transform isn't named FormML for a good reason saving forms as DAP has severe form design limitations. Most forms have subforms, tab controls, or other objects that ReportML ignores. For example, saving Northwind.mdb's sample Employees form as a page results in colorful but empty Caption: Employees and Header: Employees sections. Saving the Customer Phone List form creates a page with elements for the form header, detail, and footer section. The Caption section has an extra line of field-name captions, and the 26 command buttons to filter the records are missing from the option group below the navigation control (see Figure 25.15). Loss of the command buttons isn't a major issue because the form relies on Access macros to filter the detail records.

Figure 25.15. Saving to DAP forms that generate simple lists usually works, but you must tweak the page design in most cases.

graphics/25fig15.gif

Saving a form (or a report) that has a Class Module saves the VBA code as a comment block between BEGIN VBA CODE and END VBA CODE comments (see Figure 25.16). The purpose of saving the code in the script is to aid you when rewriting the code in VBScript, if possible.

Figure 25.16. The Script Editor displays the VBA code that you can use as a reference when attempting to emulate the form's actions with VBScript.

graphics/25fig16.jpg

Note

graphics/new.gif

Access 2003 doesn't let you save unbound forms as DAP. Access 2002 could save unbound forms, such as Main Switchboard, to non-functional replicas.


Following are a few types of forms that you can save as DAP with varying degrees of success:

  1. Simple forms without subforms, such as the Customer Phone List. Bound combo boxes used for lookup and other operations are empty. Bound subforms display all records from the underlying table or query.

  2. Subforms that contain bound PivotTable or PivotChart objects. For example, the sbf1997SalesPivotChart subform that you created in Chapter 18, "Adding Graphs, PivotCharts, and PivotTables," retains all its properties when saved as a page. You must specify the Default View property as PivotTable or PivotChart to create the correct version of the page. Replace the missing caption supplied by the parent form with a title (see Figure 25.17).

    Figure 25.17. PivotChart views of forms or subforms save correctly as pages. A page saved from Chapter 18's sbf1997SalesPCLinked graph displays eight lines instead of the single line specified by the link to the frm1997SalesPCLinked form.

    graphics/25fig17.jpg

  3. Bound pop-up forms and dialogs that don't contain unsupported controls. Pop-up forms and dialogs are better displayed as Web Page Dialogs such as the Employees.htm page opened by the Review Orders.htm page.



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