Filter on load different each time

randle

Registered User.
Local time
Today, 21:19
Joined
Jun 16, 2010
Messages
57
Hi,

I have a form which has a "filter on load" set to apply. This works fine however when further filtering the form after initially opening and then simply closing the database without clearing the latest filter and then opening the database again, the latest filter is applied instead. How can I get the form ignore the latter filter and remember to apply a specified filter each time it's opened?
 
randle,

one thing that I personally know about filters is that not turning them off when you're done with the data can give you headaches. I don't know all of the ins and outs of them, but I do know that filters are 'sticky' things, so you may want to try using 'false' with the 'filteron' property on the close event or something.

It is also entirely possible that the part of the engine (or memory) that stores filters can only store one at a time? I'm just spitballing here of course, but I wonder if a stored filter (especially if it's not turned off) trumps the 'filter on load' expression the next time the form is opened? In all reality, it shouldn't, as no other property behaves this way.

As I mentioned earlier, I'm going out on a limb here, so maybe those ideas will help you solve the issue.
 
Cheers for the reply. How would the VBA code look for the fase filteron property? Something like
Me.Filter= False
?
 
Sorted!! Managed to do this by creating a Macro with a "SelectObject" action to select the form and then an "ApplyFilter" action with the relevant argument and adding this macro to the main form's "OnOpen" property. This now removes any last set filters and applies the chosen one instead.

Cheers
 

Users who are viewing this thread

Back
Top Bottom