Passthrough Query Variable

M

mroby

I am having difficulty with running a passthrough query that contains a
variable. This query runs against an Oracle database. I can run it if I
replace the variable with a value. All I need to do is insert a variable and
have the query recognize that variable.

example:
Select Group From GroupTable Where Group IN ('Var1')

How can I have Access run this query?
Thanks,
Mike.
 
D

Duane Hookom

You can modify the SQL property of the saved p-t query with code like:
Dim strSQL as String
strSQL = "Select Group From GroupTable where Group In ('" & var1 & "')"
Currentdb.QueryDefs("YourPTNameHere").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