Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2010 Export query to excel spreadsheet in currentproject.path

Posted on 2012-04-02
3
Medium Priority
?
536 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with ā€¦
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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ā€¦

916 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