Not automatically using MSQuery's own parameters feature.
To be able to use MSQuery parameters, the SQL to be a simple SELECT
written in MSQuery's own SQL dialect, rather than that odbc syntax or
the dialect of the database server. Using ocdb's CALL syntax, ANSI's
EXECUTE syntax or anything proprietary will result in the 'cannot
display graphically' (whatever that means) message, after which support
for parameters is lost.
You can, however, write VBA to dynamically change the querytable's SQL
text using values from a worksheet.
Thanks for your help. The problem is the Query Wizard only allows you to
select tables or views. It does not let you select SQL stored procedures.
You can cancel out of the wizard and then click the SQL button to enter an
EXEC stored_producer command. When you accept the SQL it does some error
checking and makes sure you have supplied the same number of parameters as
the stored procedure is expecting.
The problem is I don't know how to use a cell reference for one of the
parameters.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.