Access 2010 Export query to excel spreadsheet in currentproject.path

I need the code to export a query to an excel spreahsheet residing in the currentproject.path.
JAMES125Asked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
docmd.transferspreadsheet acexport,10, "queryName", currentproject.path & "\myExcel.xlsx", true
0
 
Rey Obrero (Capricorn1)Commented:
you can also use

docmd.transferspreadsheet acexport,acSpreadsheetTypeExcel12, "queryName", currentproject.path & "\myExcel.xlsx", true

or

docmd.transferspreadsheet acexport,acSpreadsheetTypeExcel12xlm, "queryName", currentproject.path & "\myExcel.xlsx", true
0
 
JAMES125Author Commented:
Perfect, thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.