filtering a saved query ?

K

KK

I have a saved query.
when I am in the design mode, If I right
click and go to Properties of that query
I see a property called Filter.

Now what I want to do is apply a filter
to the query.

My query is not assigned to a form, but
it is assigned to a listbox. The problem is
listbox doesn't have a filter property

how can I set a filter to the query and assign
the results to the list box?

rgds
KK
 
J

Jim Allensworth

Querydefs don't have a filter property either. I think your best bet
would be to use an SQL statement as the Row Source of the list box
rather than a querydef. Then just rewrite and reset the Row Source.

You might set the SQL string as a module level constant and then just
modify when needed. - also any OrderBy clause that might be in there.

- Jim
 

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