DoCmd.OutputTo Question

G

Guest

When I run the following command to export data to Excel, I get the following
error message when I open the Excel spreadsheet. "File Error. Some number
formats may have been lost."

The command is:

DoCmd.OutputTo acOutputQuery, "qryGetMasterFromCriteria", acFormatXLS,
strExportLocation

Any ideas?
 
F

fredg

When I run the following command to export data to Excel, I get the following
error message when I open the Excel spreadsheet. "File Error. Some number
formats may have been lost."

The command is:

DoCmd.OutputTo acOutputQuery, "qryGetMasterFromCriteria", acFormatXLS,
strExportLocation

Any ideas?

Haven't a clue.
But try the TransferSpreadsheet method and see it that works without
the error..

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97,
"qryGetMasterFromCriteria", strExportLocation,True

Look it up in VBA help for all of the arguments.
 

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

Top