473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VBA filter code does not work!

Anyone have a clue about this:

Here's some form code:

Me.Filter = ""
Me.FilterOn = false

This code does NOT purge the filter criteria.

What's up? What am I missing?
Nov 12 '05 #1
4 18069
> Me.Filter = ""

This will clear the filter criteria in the current session, but won't stick once
the form is closed. If you want to programmatically remove the filter
permanently, you will need to use VBA to open the form in design mode, set the
filter property and then save and close the form.
Me.FilterOn = false


This does not alter the form's "Filter" property. The FilterOn property merely
turns the filter on and off.

--
Bruce M. Thompson
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #2
Thanks Bruce.

On Tue, 7 Oct 2003 20:33:49 -0400, "Bruce M. Thompson"
<bthmpson@big_NOSPAM_foot.com> wrote:
Me.Filter = ""


This will clear the filter criteria in the current session, but won't stick once
the form is closed. If you want to programmatically remove the filter
permanently, you will need to use VBA to open the form in design mode, set the
filter property and then save and close the form.


I did NOT know this. This fact seems to mean that I should save the
form from design view with NO filter defined. Then when the form is
opened, no filter will be in place.
Me.FilterOn = false


This does not alter the form's "Filter" property. The FilterOn property merely
turns the filter on and off.


I knew this.
Nov 12 '05 #3
> >> Me.Filter = ""

This will clear the filter criteria in the current session, but won't stick oncethe form is closed. If you want to programmatically remove the filter
permanently, you will need to use VBA to open the form in design mode, set thefilter property and then save and close the form.


I did NOT know this. This fact seems to mean that I should save the
form from design view with NO filter defined. Then when the form is
opened, no filter will be in place.


That is correct.

:-)
--
Bruce M. Thompson
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #4
Hi. I am trying to permanently clear the filter criteria from my form properties using the method that you described. However, I have tried several variations and am not having much luck. I am using the "learn as I go method"...so I am not an expert. Any help would be greatly appreciated! Thanks.
Jul 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Robin Cull | last post by:
Imagine I have a dict looking something like this: myDict = {"key 1": , "key 2": , "key 3": , "key 4": } That is, a set of keys which have a variable length list of associated values after...
1
by: jeffgeorge | last post by:
Hi all. Trying to move Filter By Selection, Filter By Form, and Apply/Remove Filter directly into my form. No luck. Is there anyway to move them into the header of the form or, as another...
7
by: damjanu | last post by:
Hi All; I need little help. I have a datasheet form. I allow user to do 'filter by selection'. My form contains a column with values. As user changes selections, I want to calculate totals....
8
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and...
9
by: dee | last post by:
I'd like to filter by the following criteria: left(LeadDisposition,3) = "Sit" AND Appt_Date = Text767 I have no idea how to do this. Appreciate help.
3
by: Henrootje | last post by:
I have a form based on the query: SELECT tblCreditGeld.CG_Selected, tblCreditGeld.CG_ClientSelected, tblCreditGeld.CG_ComplexSelected, tblCreditGeld.CG_OKGR_ID, tblCreditGeld.CG_OKGR_IDN,...
3
by: remdeb648 | last post by:
Hi, I am programming a multi-criteria filter in an Access Data Page. I successed to make a simple criteria filter using the code below: (the code is on a button click action) ...
4
by: Fran | last post by:
I recently tried to use code for "Use a multi-select list box to filter a report" from Allen Browne in my database. I was able to add the code and adapt it to my needs, however I am getting an...
1
by: david.katkowski | last post by:
I'm trying to use the __builtin__ filter function within a class; however, I receive the following error: NameError: global name 'MajEthnic' is not defined The line of code is: EthMaj =...
0
by: newcooler | last post by:
I have a junction table for instance 1 service can have many contacts - using a composite key junction table. what i want to do is to filter all the contacts that belong to the service using the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.