View Single Post
  #8   Report Post  
onedaywhen
 
Posts: n/a
Default

DavidM wrote:
I designed my query using SQL Server QA
I then go to
Excel and copy/paste my SQL into the MS Query tool. It prompts me

that I
will lose GUI functionality from the editor.
I guess, in return, I also lose the ability to use in the value field

[Enter
Year] for it to prompt for parameters to run the query.


Correct.

Anyone know of any
way around this?


Re-write the query using MS Query's GUI tools <g. I can't see how you
can have it both ways i.e. T-SQL syntax generally and MS Query's syntax
just for parameters, the two don't mix. The obvious workaround is to
get the user input (e.g. via a userform dialog) and dynamically change
the SQL/stored proc call each time using VBA code (see
http://www.dicks-clicks.com/excel/Ex....htm#ChangeSQL).
Jamie.

--