Programmatically Importing and Exporting XML Data

Access has ExportXML and ImportXML methods. You can use these methods to export data to XML and import data from XML, respectively. The ExportXML method of the Application object looks like this:

Application.ExportXML(ObjectType as AcExportXMLObjectType, _
    DataSource as String, _
    [DataTarget as String], _
    [SchemaTarget as String], _
    [PresentationTarget as String], _
    [ImageTarget as String], _
    [Encoding as AcExportXMLEncoding = acUTF8], _
    [OtherFlags as Long])

You use the ObjectType parameter to specify the type of object that you want to export. The ObjectType can be acExportForm, acExportFunction, acExportQuery, acExportReport, acExportServerView, acExportStoredProcedure, or acExportTable

Get Alison Balter's Mastering Access 2002 Enterprise Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.