Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter on form (Access 97)

Status
Not open for further replies.

weeze2

Technical User
Jun 18, 2002
129
0
0
DK
Hi
I am having a problem with a subform. I use the filter on the form to get hold of certain records.
But for some reason the filter only works for a while (no pattern), then when I use the filter nothing comes up.

I then every time need to open the form in design view, select propperties > data, and delete the contents of Filter.

After I have done that , it works fine..untill the next time it happens.

Does anyone know what could be causing this and how to FIX it?
Thanks
 
I seem to remember this a being a bug in Access 97,you could maybe look on the Tech Support site at Microsoft to confirm this.

I do something like this in the OnOpen or OnLoad event for the Form/Subform
Code:
    Me.Filter = ""
    Me.FilterOn = False

    Me.Filter = <YourFilter>
    Me.FilterOn = True
[\code]
this resetting and setting of the filters takes the unpredictability out of it in my experience.
 
Another thing you could do is in your on exit event include the following code:

Code:
Me.Filter = &quot;&quot;
Me.FilterOn = False

It wouldn't fix the problem necessarily, but whenever the form was closed it would clear the filter so you shouldn't have to go into design mode to clear it. In combination with the previous reply, this should eliminate the need for programmer intervention when the problem occurs.

Dale Beitz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top