Hi everyone!
This is kind of a folow up question to thread thread68-506187.
I'm developing part of a system to bring data into Excel from an accounts package that's built on Fox Pro. I'm also quite new to ('real world') data queries and VERY new to SQL!
So, I had two choices either record the SQL into the routine or create a query and call it from the routine. The SQL idea produced ridiculous results when I tried to record it particularly when trying to join the tables. Most of the SQL didn't record, and I'm not sure enough to write it into the VBE directly.
So, I have a query that does the job using
etc......etc....etc.....
The question is, is there another way to do this (run a saved query) without 'Adding' each time as I'm left with a ton of query tables. I'm currently getting around this, rather clumsily, by finding them and deleting the old ones before running the query.
Any help or general pointers appreciated.
;-) If a man says something and there are no women there to hear him, is he still wrong?![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
This is kind of a folow up question to thread thread68-506187.
I'm developing part of a system to bring data into Excel from an accounts package that's built on Fox Pro. I'm also quite new to ('real world') data queries and VERY new to SQL!
So, I had two choices either record the SQL into the routine or create a query and call it from the routine. The SQL idea produced ridiculous results when I tried to record it particularly when trying to join the tables. Most of the SQL didn't record, and I'm not sure enough to write it into the VBE directly.
So, I have a query that does the job using
Code:
Set myQT = Worksheets("DataImport").QueryTables.Add(Connection:= _
"FINDER;M:\Accounts\Janis\Opera stuff\MB_TestArea\MPC_DataLoad_v1.dqy", _
Destination:=Range("DataStart"))
etc......etc....etc.....
The question is, is there another way to do this (run a saved query) without 'Adding' each time as I'm left with a ton of query tables. I'm currently getting around this, rather clumsily, by finding them and deleting the old ones before running the query.
Any help or general pointers appreciated.
;-) If a man says something and there are no women there to hear him, is he still wrong?
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)