Solved

Access 2010 Export query to excel spreadsheet in currentproject.path

Posted on 2012-04-02
3
472 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

26 Experts available now in Live!

Get 1:1 Help Now