Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

output command results in file deletion instead

Status
Not open for further replies.

diwin

Technical User
Nov 29, 2002
218
CA
I have the following line in a module in access 2010. It was originally written in access 2003.

DoCmd.OutputTo acQuery, "qryOutputForGIS", "MicrosoftExcelBiff8(*.xls)", sPath, False, "", 0

But now, instead of outputting the query, it deletes the destination file. Any ideas?

Daniel Dillon
O o . (<--- brain shrinking at rate shown.)
 
Instead of:
Code:
DoCmd.OutputTo acQuery, "qryOutputForGIS", "MicrosoftExcel[highlight]Biff8[/highlight](*.xls)", sPath, False, "", 0

Use this?
Code:
DoCmd.OutputTo acQuery, "qryOutputForGIS", "MicrosoftExcel(*.xls)", sPath, False, "", 0

Was that a typo?? If not, remove the Biff8 part, I think..
 
I'd try this:
DoCmd.OutputTo acOutputQuery, "qryOutputForGIS", acFormatXLS, sPath, False

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top