retrieving query criteria in VBA

P

Paul Fell

Access 2000

I have several access querys. The database is also hooked up (ODBC) to
a SQL Server backend. I want to be able, in VBA, to extract any
criteria set for a particular query by a user and pass as parameters
to a stored procedure in the backend database. I know I can
interrogate the SQL property of the querydef, but is there another
property I can interrogate which has each fields critieria which has
been set in the query?

Thanx
Paul
 
M

[MVP] S. Clark

Ken Getz did a whole series of articles about Deconstructing Querydef. It
is not for the VBA faint of heart.

You can also parse the string from the .sql property. Retrieve everything
after the word FROM, for example.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

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