Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Excel macro to execute Access query

Can I execute an Access query from an Excel Macro and bring back the data
into the spreadsheet?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Excel macro to execute Access query

The best way to start is to record a macro while setting up the query manually.

From Worksheet menu
1) Tools - Macro - Record new macro
2) Data - Import External Data - New Database Query
3) Tools - Macro - Stop Recording.

"Denise" wrote:

Can I execute an Access query from an Excel Macro and bring back the data
into the spreadsheet?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Excel macro to execute Access query

hi,
technically this built into xl via microsoft query.
2003 on the menu bar....datainport external datanew database query
set access db as the data source.
scroll to your access db.
when the table source apears, scroll down to the query and pull all of the
queries fields into MSQ then just follow the rest of the wizzard.

regards
FSt1

"Denise" wrote:

Can I execute an Access query from an Excel Macro and bring back the data
into the spreadsheet?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Excel macro to execute Access query

hi
if you have 2007 see this site
http://office.microsoft.com/en-us/he...491511033.aspx

regards
FSt1

"FSt1" wrote:

hi,
technically this built into xl via microsoft query.
2003 on the menu bar....datainport external datanew database query
set access db as the data source.
scroll to your access db.
when the table source apears, scroll down to the query and pull all of the
queries fields into MSQ then just follow the rest of the wizzard.

regards
FSt1

"Denise" wrote:

Can I execute an Access query from an Excel Macro and bring back the data
into the spreadsheet?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Excel macro to execute Access query

I have attempted to use MS Query in the past with XL97, XL2000, and XL2002
only to run into Excel crashing on account that MS Query uses ADO, and
within Excel, there is a documented issue with memory leaks when using ADO.
I don't know if this issue has been fixed in XL2007 or not, but it is
documented for prior versions.

--
Thanks,

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"FSt1" wrote in message
...
hi,
technically this built into xl via microsoft query.
2003 on the menu bar....datainport external datanew database query
set access db as the data source.
scroll to your access db.
when the table source apears, scroll down to the query and pull all of the
queries fields into MSQ then just follow the rest of the wizzard.

regards
FSt1

"Denise" wrote:

Can I execute an Access query from an Excel Macro and bring back the data
into the spreadsheet?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Excel macro to execute Access query

hi
i've been using MSQ since xl97 and have had no such issues.

regards
FSt1

"Ronald R. Dodge, Jr." wrote:

I have attempted to use MS Query in the past with XL97, XL2000, and XL2002
only to run into Excel crashing on account that MS Query uses ADO, and
within Excel, there is a documented issue with memory leaks when using ADO.
I don't know if this issue has been fixed in XL2007 or not, but it is
documented for prior versions.

--
Thanks,

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"FSt1" wrote in message
...
hi,
technically this built into xl via microsoft query.
2003 on the menu bar....datainport external datanew database query
set access db as the data source.
scroll to your access db.
when the table source apears, scroll down to the query and pull all of the
queries fields into MSQ then just follow the rest of the wizzard.

regards
FSt1

"Denise" wrote:

Can I execute an Access query from an Excel Macro and bring back the data
into the spreadsheet?




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Excel macro to execute Access query

Here's the link to the issue that I have faced.

http://support.microsoft.com/kb/319998

--
Thanks,

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"FSt1" wrote in message
...
hi
i've been using MSQ since xl97 and have had no such issues.

regards
FSt1

"Ronald R. Dodge, Jr." wrote:

I have attempted to use MS Query in the past with XL97, XL2000, and
XL2002
only to run into Excel crashing on account that MS Query uses ADO, and
within Excel, there is a documented issue with memory leaks when using
ADO.
I don't know if this issue has been fixed in XL2007 or not, but it is
documented for prior versions.

--
Thanks,

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"FSt1" wrote in message
...
hi,
technically this built into xl via microsoft query.
2003 on the menu bar....datainport external datanew database query
set access db as the data source.
scroll to your access db.
when the table source apears, scroll down to the query and pull all of
the
queries fields into MSQ then just follow the rest of the wizzard.

regards
FSt1

"Denise" wrote:

Can I execute an Access query from an Excel Macro and bring back the
data
into the spreadsheet?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
execute a make table query in an access database Question Boy Excel Programming 1 April 18th 08 04:07 PM
Excel VBA Query Using Access Database Hangs on 2nd Execute Mike Knight Excel Programming 7 November 4th 04 05:12 PM
Execute a query from a macro Ken Schmidt Excel Programming 0 June 26th 04 09:59 PM
access 97 to excel 97: execute macro automation TC[_3_] Excel Programming 2 July 15th 03 07:38 PM
access 97 to excel 97: execute macro automation Tom Ogilvy Excel Programming 0 July 13th 03 05:16 PM


All times are GMT +1. The time now is 12:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"