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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Newbie Question 3

Status
Not open for further replies.

tinahowe

Technical User
May 10, 2002
8
GB
I have created quite a large database and have popped it out for general usage - the problem is everytime someone filters by form to bring up info they forget to clear it for the next time. Is there a button I can program with this command - clear filter - and what command would I use.

Thanks

Tina
 
Tina - open the form in design mode, and open the CODE window. ADD this line of code to the form's CLOSE event:

Me.FilterOn = FALSE


That SHOULD turn off any filters that are in effect when you close the form.

Jim




How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
You can place a button on the form and in the click event put:

me.filteron = false

You could also place this in the close event to clear the filter when the form closes.

 
Thanks for your help but I think I miss-represented my question - I don't need a button to close the filter by form - rather I would like a button that clears the contents of filter by form with the click of a button. When I just close it, the previous filter is always still there. Is there anyway to clear the contents of a filter by form.

Thanks

Tina
 
I still can't seem to clear the contents of the filter by form criteria - it clears the filter by form from the screen but when I re-click on the filter by form the criteria is still there.

Totally frustrated.
 
I think maybe it is us (maybe just me) who is missing something. Do you actually have a filter in the filter property of the form at design time?
 
Tina, I have something on my website that you might find a little easier to use. It's a demo of a continuous form that allows you to filter via a value in a text box. It's very simple to set up, and has almost no code.

Check out the FILTER/SORT example. It's about the 7th one down the list.


Jim
How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
Newbie still using MS Access 97 due to corporate expense cuts. Form uses macro for filtering records. First letter of last name has a button to represent it and the filter produces all names that start with that letter.

I now get a "Type Mismatch" (error 13). Ok, RTFM time. Visual Basic? I never learned any Visual Basic. I can sort of read the code for all the good it does me. How can I fix this problem?

Thanks in advance.
 
Last person - I think you have posted the question to the wrong thread - I am a new person trying to get help as well. Sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top