Can't Export Query To .xml


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 :)

Roderick Koch

In the button's On Click event, you could put code like

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

John Nurick

Hi Dripper,

This works as expected when I try it:
select the query in the Database window
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)
Jan 28, 2013
Reaction score
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.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question