Solved

Problems clearing Me.Form.Filter

Posted on 2013-02-05
6
426 Views
Last Modified: 2013-02-05
Hi

Using Access 2010

Here is the code.

    Me.Form.Filter = ""
    Me.FilterOn = True

I would expect the value of me.Form.Filter to be =  "".
I would expect for the filter would allow everything even though the filter is still on.

Instead, the value of Me.Form.Filter seems unaffected by this code.  The old filter condition remains.
0
Comment
Question by:peispud
  • 3
  • 3
6 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 38857990
me.filteron=false  ' will show all records
0
 

Author Comment

by:peispud
ID: 38858012
Will that be enough though?

I am concerned that I am not controlling the value of me.Form.Filter

So if Me.Form.Filter = "" doesn't work,  will me.Form.Filter = "Someting here"   work every time?

is Me.Form.Filter = "" valid code?
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 38858045
<Will that be enough though?>
why don't you try and see for yourself..
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:peispud
ID: 38858069
I am concerned that I am not controlling the value of me.Form.Filter

This is really what I meant by "Will that be enough though?"

If I can't purge the form filter with              Me.Form.Filter = "",  then  something is up.  It's bad code or a bug or something.

If I don't understand  why Me.Form.Filter = "" doesn't work, then I cannot be 100 percent sure that any other value that I assign to me.Form.Filter will work under ever circumstance / every time.  

I believe that my question was valid.
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 38858072
try

me.filter=""
me.filteron=true

or
me.filter=""
me.filteron=false

also, open your form in design view and delete whatever is in the filter property, save the form and try the code again
0
 

Author Closing Comment

by:peispud
ID: 38858096
Thank you.   I appreciate your help.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now