Pass Through Query with Parameters Help

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
 
D

Duane Hookom

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
 

Ask a Question

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.

Ask a Question

Top