Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL too complicated for MS Query

Status
Not open for further replies.

Rodiggy

Technical User
Jul 25, 2001
4
US
Hi all,

In Excel 2000, I want to be able to return the results of an SQL stored procedure that requires parameters which I will get from the user using 3 combo boxes which will get their data from some simple SQL queries. Now, I'm pretty sure I can do all of this except running the stored procedure with the parameters. MS Query says it will not except parameters for any SQL it cannot graphically display (the procedure has ifs and subqueries I can't just copy the SQL into MS Query it still won't work).

So, I assume I need to use some VBA. If this were a web page w/ VBScript I could do it no problem, but I have little experience with VBA. Am I correct that I must use VBA I cannot due it with MS Query alone? If that is the case, if possible could someone get me started with the code, or some pointers to run a stored procedure whose 3 parameters are cells on a worksheet.

Thanks,
Roland Whitmyre
 
Being more familiar with Excel than SQL I wonder if you are looking in the wrong direction. I am not sure what you are trying to achieve. Where does your data come from ?

If from Excel, then possibly a normal Excel method would be easier - Pivot Tables are especially quick and powerful.

If from Access, then Access queries are more powerful than MS Query - especially, with a complicated one, the ability to "query a query". You can still link Excel to an Access query via ODBC/MS Query. Regards
BrianB
** Let us know if you get something that works !
================================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top