Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Query - Where is it???

I wrote a query with import external data and query and
it works fine but I want to now modify it and put it in a
loop working for a number of parameters.

My first question is: where did it go?? I see a .dsn
file and an .iqy file in my data sources but I can find
no references to the query in the workbook or anywhere in
the vba code. Assuming that the .iqy and .dsn have the
details of what is to be queried - where is the link -
how do it know (kinda like the Thermos bottle - it keeps
hot things hot and cold things cold - how do it
know???) ???

And secondly what form should I use to write my query
directly into VBA - I certainly know how to write the raw
sql but what function should I use.

Thanks a lot - I know I am close but I am missing
something fundamental here.

Dan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Query - Where is it???

Right click on you returned data and select edit = Query.

Turn on the macro recorder and build the query manually to get the code.

--
Regards,
Tom Ogilvy

Dan wrote in message
...
I wrote a query with import external data and query and
it works fine but I want to now modify it and put it in a
loop working for a number of parameters.

My first question is: where did it go?? I see a .dsn
file and an .iqy file in my data sources but I can find
no references to the query in the workbook or anywhere in
the vba code. Assuming that the .iqy and .dsn have the
details of what is to be queried - where is the link -
how do it know (kinda like the Thermos bottle - it keeps
hot things hot and cold things cold - how do it
know???) ???

And secondly what form should I use to write my query
directly into VBA - I certainly know how to write the raw
sql but what function should I use.

Thanks a lot - I know I am close but I am missing
something fundamental here.

Dan



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
Import New Database Query (Union Query) in Spreadsheet klock Excel Discussion (Misc queries) 2 September 24th 09 01:30 AM
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Importing Data via Web Query - Can values be passed to query? [email protected] Excel Discussion (Misc queries) 5 May 9th 06 06:21 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


All times are GMT +1. The time now is 05:03 PM.

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"