Solved

Problems clearing Me.Form.Filter

Posted on 2013-02-05
6
425 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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 different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

747 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

9 Experts available now in Live!

Get 1:1 Help Now