Pass Through Query with Parameters Help

  • Thread starter Thread starter jeff rowland
  • Start date Start date
J

jeff rowland

I am trying to develop a pass-through query that will
accept two parameters when querying an Informix table.

I have a general pass through query that worksand returns
the data from the applicable informix table:

select number,sdate,edate from act where site = 3 and
fiscal = 2004 and stat <> "CN" and auth = "Y"

What I would like to do is have the user prompted to enter
a start and end date then included the parameters in the
pass through query ie

select number,sdate,edate from act where site = 3 and
fiscal = 2004 and stat <> "CN" and auth = "Y" and
sdate between SD and ED (Where SD and ED are the
parameters passed by the prompts). I'm stuck as to how
the pass the parameters to the pass through query.

Thanks for your help
 
I would use DAO code to change the SQL value of the saved p-t query. For
instance:
Dim strSQL as String
strSQL = "SELECT .... FROM... WHERE Site =" & Me.txtSite & " AND Fiscal
= " & ....etc...
CurrentDb.QueryDefs("qsptYourPT").SQL = strSQL
 
Back
Top