[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Programmatically export query results to Excel

Posted on 2008-06-10
4
Medium Priority
?
1,146 Views
Last Modified: 2012-06-27
I'm trying to figure out how to programmatically export data from Access to Excel, create a chart in Excel and then copy that to Word.  I've been performing this operation manually and It's no big deal, but the users want to be able to push a button.  Here's the scenario:
At month end, five chart reports are generated from a large Access customer service database.  Upper management wants to copy and paste these charts to their PDAs from Word.  I haven't been able to copy Access charts to Excel or Word.  So, I run the Access queries, copy the results table to Excel, generate an Excel chart and copy that chart to Word.  I'm sure this process could be automated, but I haven't a clue where to start.
Any ideas?  Anybody done anything like this before or seen it done?
Thanks!
0
Comment
Question by:NaughtyZute
[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
  • 2
4 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1500 total points
ID: 21751233
to export data to excel

   docmd.transferSpreadsheet acexport, acSpreadsheetTypeExcel9, _
        "QueryNameOrTablename", "c:\myExcel.xls", true, "nameOfSheet"
0
 

Author Comment

by:NaughtyZute
ID: 21769493
Thanks for the speedy reply Capricorn and I apologize for my tardy response.  As happens daily in software development, I've gotten pulled off this non-critical project to other things.  I'll try your suggestion as soon as I get a little tiime.  By what you've said then, I'll need to save the spreadsheet and then need a separate macro in Excel to generate the chart?  The user would actually be ok with pasting the charts into Word on his own.  Anyway, thanks again.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21909797
why a grade of B?
0
 

Author Comment

by:NaughtyZute
ID: 21912665
I'm sorry capricorn.  I guess because you only provided me with step 1 and because I never got to try the solution or take the thing any farther.  I guess I should have done an A.  But there was a long way to go to the Excel Chart, Word Doc. etc.  Didn't mean to offend you.  Your answer was right on.  I'll change the grade if I can figure out how.
0

Featured Post

Technology Partners: 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.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
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…

650 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