Can't Export Query To .xml

  • Thread starter Thread starter The Dripper
  • Start date Start date
T

The Dripper

According to Access 2002 Help:

"You can export just the data from a table, query,
datasheet, form, or report into an XML file. This data is
saved to a file named <filename>.xml."

I have been able to successfully export a table to XML,
but when I try to export (data only) a query, I get the
following error message:

"Microsoft Access was unable to export the data"

Is there a cure?

Any helpful response will be honestly and sincerly
appreciated :-)
 
In the button's On Click event, you could put code like
this:

DoCmd.OutputTo acOutputQuery, "YourQueryName",
acFormatXLS, "YourXLSFileName.XLS"
 
Hi Dripper,

This works as expected when I try it:
select the query in the Database window
File|Export
Save as Type: xml document


Do you have this problem with all queries, or only some, or only one?
With all databases? Can you export the same query to other file formats?

Have you installed the latest Office XP service pack? (SP2, I think)
 
I had the same very unhelpful message from Access 2010 when attempting to export a Query to XML (export to excel was fine). The answer to my problem turned out to be that the Query had a parameter request and that caused the issue with no data. I simply removed the parameter (Design the Query and delete the Criteria line) and the export worked ok. Hope this helps.
 
Back
Top