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

Import access query result to Excel gives an error 1

Status
Not open for further replies.

Katya85S

Programmer
Jul 19, 2004
190
I’m trying to import access query result to excel file and get “The type isn’t an installed data type or doesn’t support the operation you choose” error. In the code for data type parameters I’ve tried both living it blank and using “Microsoft Excel(*.xls)”. My code is:
strDirectory = "\\ServerName\ShareName\FolderName\OutputFile.xls"
DoCmd.TransferDatabase acImport, , , acQuery, "qryQueryName", strDirectory, 0
What do i do wrong?
Thank you all in advance.
 
Have a look to the DoCmd.TransferSpreadsheet method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thank you very much PH! This helps :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top