Solved

Access 2010 Export query to excel spreadsheet in currentproject.path

Posted on 2012-04-02
3
516 Views
Last Modified: 2012-04-02
I need the code to export a query to an excel spreahsheet residing in the currentproject.path.
0
Comment
Question by:JAMES125
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 37797449
docmd.transferspreadsheet acexport,10, "queryName", currentproject.path & "\myExcel.xlsx", true
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37797457
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
 

Author Closing Comment

by:JAMES125
ID: 37797483
Perfect, thanks again.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question