Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make A Pass-Through Query On the Fly

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
I want to be able to have queries defined in a table and executed by users as recordsources for reports.

I want them to be Pass-Through for speed, however I can't make SelQ_Mailing a Pass-Through and then try and pass criteria to it with DoCmd.RunSQL.

So I would like to know how I can build the query in VBA and set it to Pass-Throughand then run the query.

Thanks. Sean.
 
As you are posting in a MySQL forum, it will certainly be a good idea to mention that you are using MS-Access. Otherwise, your question is hardly understandable.

I think you instantiate a new Query object, assing it some SQL and set the type to pass-through. finally, use the its "Run" method to run it. Look in the help file for the methods and properties of the Query object.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top