Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Access query in VBA

Hello !

I'm currently developping an Excel-Access application. I would like, for my
import/export function in VBA, to use pre-saved access query in my vba code

Is it possible to do so? How?

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Access query in VBA

Laurent

Certainly

It's easier to set up if you record yourself (ToolsMacros...Record new
macro) doing the following

DataExternal DataNew Database Query... Select MS Access as the source
Navigate to the databaseSelect the queryComplete the rest of the
wizardReturn Data to Excel.

If you then press Alt+F11, you will find the code written for you in
'Module1'

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Laurent M" wrote in message
...
Hello !

I'm currently developping an Excel-Access application. I would like, for
my
import/export function in VBA, to use pre-saved access query in my vba
code

Is it possible to do so? How?

Many thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Access query in VBA

thanks nick your answer seems nice, but i don't have time to test it yet

jim i dont 't get where you specify the access query, i'm actually quite a
beginner in vba
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Access query in VBA

Stic with Nick's suggestion. Mine is a little more advanced in that you dont
specify the query but rather the SQL statement that generates the query
results...

"Laurent M" wrote:

thanks nick your answer seems nice, but i don't have time to test it yet

jim i dont 't get where you specify the access query, i'm actually quite a
beginner in vba

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
Query from Access into Excel cause Access to go to read only T Stephens Excel Discussion (Misc queries) 0 March 24th 09 04:17 PM
Can I use MS Query in Excel like an Append Query in Access Sam Wardill Excel Discussion (Misc queries) 0 April 11th 06 02:41 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM
Access query vs. Excel query dutty Excel Programming 1 July 28th 04 07:19 PM


All times are GMT +1. The time now is 09:55 AM.

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

About Us

"It's about Microsoft Excel"