retrieving query criteria in VBA

  • Thread starter Thread starter Paul Fell
  • Start date Start date
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
 
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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top