Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro that Dumps Access Query into Excel

Status
Not open for further replies.

gmillerinc

IS-IT--Management
Aug 27, 2003
28
US
The Subject pretty much describes what I need to do. I would like to run a macro (in Excel) that runs an Access query and dumps the fields and records from the query over into Excel. If possible the dumped data coming into Access can have its own worksheet, but I have other worksheets with other data. In other words, the dumped data shouldn't create an entirely new spreadsheet (just a new worksheet).

Please help!!
 
You would not need to export the data to excel, (too many steps)...

Create a live link to the table or query from within excel,

From excel click Data>Get External Data>New Database Query>....the choose msaccess databases* from the list...follow the wizard from there (to select your mdb, table or query)
then return your data to excel.
***LOOK CLOSELY**
You can opt to use the wizard or MsQuery (a gui type interface, similar to access)at this point...
after your comfy with this...I would recommend the MsQuery option.


when data is returned,...you can right click in the data and select properties to refresh on open...auto fill formulas etc.

this is now a live link, any time the workbook is opened. your current / up to date access data comes in (if you set the refresh on open option)
 
Thank you, I will give this a shot....stay tuned please.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top