Share via

Filter Not Clearing properly

Anonymous
2023-10-23T20:14:27+00:00

Ok,

I want to scream. Sometimes this code works and sometimes it does not.

Me.cboGoTo = Null
Me.Src = ""
Me.FilterOn = False    

Even if I also add Me.Filter=""

It will not remove the filter.

I have already had to recreate many forms due to this failure and I am done doing that.

Can someone please tell me when this code will not work and why?

Thanks

Tammy

Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

7 answers

Sort by: Most helpful
  1. Anonymous
    2023-10-24T20:40:55+00:00

    Sorry, but I can't offer any explanation for that. Can you post the file to OneDrive or similar, so that we can try to debug the form?

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-10-24T20:30:43+00:00

    I am saying that the form remains filtered to the last expression assigned to its Filter property.

    Nothing will remove this filtering.

    I wish your last sentence was true in this situation but it is not.

    I tried to copy and paste images so it could be seen, but my snip does not work.

    Tammy

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2023-10-24T20:08:33+00:00

    Are you saying that the form remains filtered to the last expression assigned to its Filter property, or merely that the expression remains assigned to the Filter property?  If the latter, this is normal behaviour as the Filter property is persistent.  Provided that the form's FilterOn and the FilterOnLoad properties are False the Filter will not be applied unless you specifically set the FilterOn property to True by code or through the built in user interface.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-10-24T18:38:01+00:00

    Try this:

    Me.cboGoTo = Null

    Me.Src = ""

    Me.Filter =""

    Me.Refresh

    Me.FilterOn = False

    This did not work. The filter remains.

    Thanks

    Tammy

    Was this answer helpful?

    0 comments No comments
  5. ScottGem 68,830 Reputation points Volunteer Moderator
    2023-10-24T00:33:54+00:00

    Try this:

    Me.cboGoTo = Null

    Me.Src = ""

    Me.Filter =""

    Me.Refresh

    Me.FilterOn = False

    Was this answer helpful?

    0 comments No comments