Pass-through queries - VBA Code Parameters

S

Scott Strauss

I am looking for the proper syntax for inclulding a series of pass-through queries in a VBA module. I also want to enable users to enter a parameter for the queries

Thanks
Scott Strauss
 
T

Tom Ellison

Dear Scott:

The proper syntax is the syntax for the engine that receives the
pass-through query. You don't say what engine that is.

You are probably familiar with the Jet database engines behavior where
it will prompt the user for anything "missing" in the query. If you
aren't using Jet, then you are depending on that "other" database
engine to do this for you. Most other engines do not do that, so it
isn't going to work.

You could have the user enter the desired values in controls on your
form, then pass these to whatever engine is going to execute the
query. Just how you would do that depends again on the facilities
made available by that database engine. Many engines have the ability
to have a query written and stored in the "back end" along with the
data, and allow you to call that query by name and pass parameters to
it. You would have to pass the actual values, often inside quotation
marks, by extracting them from controls as I suggested.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 

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