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.
 
Back
Top