VBA to edit a Query Properties

  • Thread starter Thread starter Kit Truong
  • Start date Start date
K

Kit Truong

Hello,

Is there anyway that I can use VBA to modify the properties of a query.
Specifically, a criteria (where condition) a for a date field.

Thanks.

P.S. I know I can pass a filter when opening the query, but that's not what
I want to do.
 
Kit said:
Hello,

Is there anyway that I can use VBA to modify the properties of a query.
Specifically, a criteria (where condition) a for a date field.

Short answer is "yes".

One of the properties you can manipulate is the Query's SQL. You can
replace all or part of that, including its "WHERE" condition.
Thanks.

P.S. I know I can pass a filter when opening the query, but that's not what
I want to do.

OK, then maybe there's something else you want to do. What is it? If
you've already tried replacing the Query's SQL, what happened that you
disliked?

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 

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