Can't Remove Filter from Form

  • Thread starter Larry R Harrison Jr
  • Start date
L

Larry R Harrison Jr

I have Access 2000. I have a continuous "browse all" form
which can show any number of different record
combinations. Almost all of these are handled by the
RECORDSOURCE attribute, but one is handled by a "filter."
This filter is handled by code assigned to the ON CLICK
event procedure of a check box on the form with a caption
stating something like "Hide Old Entries."

I have a report setup to inherit this form's RECORDSOURCE
and its FILTERS so that it shows the exact same records--
along with sorts, filters, etc--as the form does. That's
actually the point of the report, to allow the user
to "print these records."

It works fine except in one scenario--where the user
clicks this particular filter (turning it on), clicks it
again to turn it off, then tries to print these records.
When they do this, the filter remains on and the records
are filtered when they shouldn't be.

I tried putting in code which--if the user clicks the
checkbox a 2nd time (turning it off)--sets the Filter to a
null value. Problem is, it remains with the old filter.
I've tried DoCmd.RunCommand accmdRemoveFilterSort. NOTHING
and I mean NOTHING will get rid of this filter.

Me.FilterOn=False will keep the form from showing the
results of the filter, but then the report STILL inherits
the filter and filters when it isn't supposed to. This
seems to be due to the Me.Filter="" not totally clearing
the filter out.

Tips?

LRH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top