From: Phil Smith on
Just to be clear. I can NOT create a passthrough query that references
a form control for criteria. I would have to generate a stored SQL with
the value of that control, then execute it

IF so...

If I create a stored dummy query as a passthrough query, do I need to do
anything special when I replace the dummy query with the real query, or
when I run it (from code) to keep it as a passthrough query?

Phil
From: Duane Hookom on
I would create a pass-through with the proper connection string and any SQL
statement. Then use a little DAO code to update the SQL property of the
existing P-T query.
Dim strSQL as String
strSQL = "SELECT ...."
CurrentDb.QueryDefs("qsptYourName").SQL = strSQL


--
Duane Hookom
MS Access MVP


"Phil Smith" <phil(a)nhs-inc.com> wrote in message
news:e$3deNuyKHA.5332(a)TK2MSFTNGP02.phx.gbl...
> Just to be clear. I can NOT create a passthrough query that references a
> form control for criteria. I would have to generate a stored SQL with the
> value of that control, then execute it
>
> IF so...
>
> If I create a stored dummy query as a passthrough query, do I need to do
> anything special when I replace the dummy query with the real query, or
> when I run it (from code) to keep it as a passthrough query?
>
> Phil