LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Use MS Query in VBA to only get a SQL statement

I wonder if this were possible:
Use MS Query to construct a SQL statement and use the statement in VBA code
(ADO, ODBC connecting to Interbase), but don't let it run the statement.
So just use the MS Query as a SQL wizard, incorporated in VBA code.
Doing this would save a lot of coding to get a similar wizard, although it
shouldn't be too difficult either.
One drawback I can see is that MS Query won't let you do a WHERE condition
on a field that is not in the SELECT
clause. The good thing though is that it will automatically add any joins,
although I am not sure how it will handle
joins that are not inner joins.
Hope this explains it clear enough and thanks for any advice.

RBS

 
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
IF Statement Query MissV Excel Worksheet Functions 5 May 27th 08 09:42 AM
If statement query Rajula Excel Worksheet Functions 3 April 20th 07 11:14 AM
IF statement query shakey1181 Excel Discussion (Misc queries) 2 November 8th 06 03:17 PM
IF statement query JaB Excel Worksheet Functions 5 September 27th 06 04:34 PM
Run Query statement in Excel LSB[_2_] Excel Programming 0 September 17th 03 09:53 AM


All times are GMT +1. The time now is 09:40 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"