Query - Where is it???

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

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
 
Right click on you returned data and select edit => Query.

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