Pass Through Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I am using a pass through query to return a resultset. I am trying to limit my resultset by using dates entered on a form. I tried to reference the date boxes on my form to accept input to the query, but query refuses to run. SQL Server thrown up on me. My only recourse is to create a connection to the DB under the form and embed my entire SQL statement in VBA, but it is long query. I appreciate any suggestion. My goal is for the passthrough query to accept 2 dates entered on a form so the dataset is limited. Thank you.

-Toco-
 
You can use DAO to change the SQL of the pass-through query...
CurrentDb.QueryDefs("qsptYourPT").SQL = "SELECT...."

--
Duane Hookom
MS Access MVP


Toco said:
Hello. I am using a pass through query to return a resultset. I am
trying to limit my resultset by using dates entered on a form. I tried to
reference the date boxes on my form to accept input to the query, but query
refuses to run. SQL Server thrown up on me. My only recourse is to create
a connection to the DB under the form and embed my entire SQL statement in
VBA, but it is long query. I appreciate any suggestion. My goal is for the
passthrough query to accept 2 dates entered on a form so the dataset is
limited. Thank you.
 
Back
Top