Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2006
    Location
    Gtr London, England
    Posts
    256
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Export to XML (Access 2003)

    Hi,

    Im quite new to the world of Access and have a query that I need to export out and convert the data to xml. I can do this easily enough by going through file and export, but, ideally, I need a macro that can be run that exports the query and at the same time converts it to xml ?

    When building the macro, the 'Output To' doesnt give the option of .xml on the 'Output Format'.

    Any help is greatly appreciated.

    Cheers.
    Lee

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Export to XML (Access 2003)

    Macros don't appear to support export to XML. You'll have to use the ExportXML method of the Application object in VBA. Example:
    <code>
    Application.ExportXML _
    ObjectType:=acExportQuery, _
    DataSource:="qryCustomers", _
    DataTarget:="C:TestCustomers.xml"
    </code>
    Type ExportXML in the Visual Basic Editor and press F1 to get help on this method.

  3. #3
    3 Star Lounger
    Join Date
    Aug 2006
    Location
    Gtr London, England
    Posts
    256
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Export to XML (Access 2003)

    Hi Hans,

    Thanks for that. I'll have a play around following your suggetions and make a post back once Ive found a way, in case someone else comes across the same problem.

    Thanks again.

    Cheers.
    Lee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •