John,
Could it be, in your case, that the saved query executes
more quickly because Access transparently saves an
execution plan with saved queries?
I don't know how you can achieve your objective without
recreating the query or SQL in code - in which case,
as you seem to have found, it will run more slowly. Usually,
the only parameters you'd pass to a query are values to
complete a query's criteria. You want to fundamentally
change the action of the query, which I think means you
will need to re-create it or re-create an SQL, substituting
a variable for the destination table name in the SQL string.
I've never tried that for an external database, but I imagine
it's possible.
Geoff
|