FilterByForm assistance needed

smathisen

New member
Local time
Today, 09:02
Joined
Jul 2, 2003
Messages
3
Should be a simple thing, but I can't find it referenced anywhere on this site or on Microsoft's.

I have a form with a lot of project data on it, which I would like users to be able to search through using the FilterByForm method, which I like. I just want to make the process a little more intuitive for non-Access folks.

First: I want all filters to be deleted when I exit a form (or on openI guess; one or the other); equivalent to what happens when one manually does "clear grid".

Second: I want to have a button on the form which then activates "FilterByForm" with a clear grid, ready for the user to fill in a few fields with some search data. (Note: I already tried building a command button to FilterByForm, which is possible, but when built, what the button really does is just apply the last old filter used by whomever last used it.

An alternative to separating the above two steps would be to combine them such that the button click first clears the grid, then opens the blank FilterByForm view.

Help?

smathisen
 
If you're using the form filter property,

me.FilterOn=false

to turn off the filtering. However, the contents of the form remains visible unless you requery, which is probably not the effect you want.

If your using a recordsource with criteria to filter, reset the form recordsourd and requery.

me.recordsource="Select * ....
me.requery
 

Users who are viewing this thread

Back
Top Bottom