passing user parameters Pass Through Qry

  • Thread starter Thread starter Anthony Viscomi
  • Start date Start date
A

Anthony Viscomi

I am new to creating Pass Through queries and I need a way to allow my user
to pass the criteria parameter that they enter via a form to the pass
through qry. I have know idea where to start.

Anthony
 
You can use DAO code to change the SQL of the saved P-T query. The basic
syntax is

CurrentDb.QueryDefs("qsptYourQuery").SQL = "SELECT ..."

Let us know if you need more detailed assistance. It would help to know the
P-T name, current SQL and the control names for the user input.
 
I'm not sure what kind of a value you are storing in txtFilter. Also, you
didn't provide the full sql of the P-T so I can only suggest code like:

Dim strSQL as String
strSQL = "SELECT ... FROM ... WHERE " & Me.txtFilter
Currentdb.QueryDefs("SQL_Pass_Through_ITM").SQL = strSQL
 
Back
Top