Solved

Access 2010 Export query to excel spreadsheet in currentproject.path

Posted on 2012-04-02
3
485 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
  • 2
3 Comments
 
LVL 119

Accepted Solution

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

Expert Comment

by:Rey Obrero
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now