connecting table/query filters to forms

B

bryanhise

Does anybody know how to connect table filters to form filters
dynamically?

For instance, I filter my table/query of say 100 records and my filter
returns 20. Currently, my form shows all 100 records. I can enter
design view, re link all of my forms to the current search, and then
all of my forms will return the 20 filtered records. I then have to
repeat these steps each time I perform a search/filter, which is often.
This method is quite cumbersome and it seems that there must be a more
efficient way to do this.

Any tips?

Thanks in advance,

Bryan
 
A

Allen Browne

You can read the Filter property from your table like this:
Currentdb.TableDefs("MyTable").Properties("Filter")
and then assign it to the Filter property of your form, and set FilterOn to
True.

It might be easier to create a form where the user can select criteria from
various boxes, and apply the filter to the form directly. For an example,
see:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
 

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