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.
 

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

Back
Top