ACC2002: Things You Should Consider When You Save Access Objects in XML Format (290313)



The information in this article applies to:

  • Microsoft Access 2002

This article was previously published under Q290313
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SUMMARY

Starting with Access 2002, you can use a new "language" called ReportML to export objects in XML format. The resulting presentation of the object will vary, depending on the type of object you export. Because presentation is automatically included when you export forms or reports to XML, this article addresses some of the things you should consider when you save these objects in XML format.

MORE INFORMATION

Saving Forms to XML

When you export forms to XML, Access creates a minimum of three files: the XML file where the actual data resides; an XSL file that is used to format the data in the XML file; and an HTM (or ASP) file that uses the XML Document Object Model (DOM) to display the result of the XSL. Optionally, you may have an XML Schema file (XSD) that contains information about the structure of the XML file.

When you save Access forms to XML, you should consider the following:
  • The data displayed in the resulting HTM file is read-only.
  • All forms are displayed in a continuous-form format without navigation buttons.
  • Images in an image control are converted, whereas OLE objects are not.
  • Background images are converted in conjunction with the PictureTiling and PictureAlignment properties.
  • Combo boxes are converted as text boxes and the bound column is shown.
  • If the ColumnWidths property of a combo box hides the first column but does not specify the width of subsequent columns, the combo box is not converted.
  • Code behind forms is not exported.

Saving Reports to XML

Because there are only two basic views for reports, columnar and tabular, reports tend to make better candidates for saving in XML format. When you save reports in XML format, you should consider the following:
  • You cannot save a report in XML format if the report is open in print preview.
  • Images in an image control or as part of the background of the report are converted, whereas OLE objects are not.
  • Background images are converted in conjunction with the PictureTiling and PictureAlignment properties.
  • Combo boxes are converted as text boxes and the bound column is shown.
  • The CanGrow and CanShrink properties for sections and controls are not supported.
  • Aggregate (totals) functions, such as Sum or Avg, are not supported.
  • Sorting and grouping within a report are supported.
  • Page headers and footers are printed only once on the page.
  • Code behind reports is not exported.

REFERENCES

For more information about exporting objects to XML, click Microsoft Access 2002 Help on the Help menu, type ExportXML in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

For more information about saving a ReportML file, click Microsoft Visual Basic Help on the Help menu, type ReportML in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Modification Type:MajorLast Reviewed:11/6/2003
Keywords:kbhowto KB290313