Export Query To XML

P

PC Datasheet

In Access2002, File - Export provides a way to manually export a query to a
XML file. Can it be done with VBA? How?

Steve
 
D

Dirk Goldgar

PC Datasheet said:
In Access2002, File - Export provides a way to manually export a
query to a XML file. Can it be done with VBA? How?

DoCmd.OutputTo will do it, but I can't find a way to keep it from
prompting for whether to export the schema or not. But poking around in
the object browser, I found the Application.ExportXML method, which I
didn't know existed. It's in the help file, though, in the Microsoft
Access Visual Basic Reference.
 
P

PC Datasheet

Thanks, Dirk! Appreciate the help.

Steve


Dirk Goldgar said:
DoCmd.OutputTo will do it, but I can't find a way to keep it from
prompting for whether to export the schema or not. But poking around in
the object browser, I found the Application.ExportXML method, which I
didn't know existed. It's in the help file, though, in the Microsoft
Access Visual Basic Reference.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Top