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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Query to Excel using DOcmd.OutputTO

Status
Not open for further replies.

AHFMR

Programmer
Oct 26, 2003
13
When I use the DoCMD.OutputTo to save a query to an Excel file the statement works fine the first time but it deletes the SQL statement after it is done saving the excel file.


DoCmd.OutputTo acOutputQuery, "Query Name", acFormatXLS, strXLfile, True

Any assistance is appreciated.

AHF
 
Hi!

Use DoCmd.TransferSpreadsheet instead.

hth

Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top