Remove Filter By Form parameters

vangogh228

Registered User.
Local time
Today, 12:18
Joined
Apr 19, 2002
Messages
302
Is there an easy VBA equivalent of the Filter By Form "Clear Grid" command?

I want to have users apply a filter by form, but then be able to hit a form button that will deactivate the filter AND remove the parameters they entered in the Filter By Form function... in other words, "clear the grid." The only way I know how to have them do this now is to right-click in the Filter By Form function and use the dropdown... and I reeeeeeeeally don't want to teach them that.

Any help is GREATLY appreciated!!

Tom
 
ghudson:

Thank you. That turns the filter off, but doesn't actually clear the grid of the previous entries. I am hoping to make it so that each subsequent use of the Filter By Form function doesn't require a manual "Clear Grid" from the right-click menu before starting a new filter entry.

Tom
 
Not sure if this is what you're looking for...

Create a button that once clicked turns the filter off and resets all the combo-box filters

Code:
Private Sub Command62_Click()

     Me.Form.FilterOn = False
     Me.Form.Filter = ""
     Me.Combo32 = ""
     Me.Combo38 = ""
     Me.Combo40 = ""
     Me.Combo42 = ""
     Me.Combo44 = ""
     Me.Combo46 = ""
     Me.Combo52 = ""
     
End Sub

Good-luck,
Ode
 
Thanks for the idea, ode. With 40 or so fields on the form, I think I'll have to find another option... or just forget it altogether.

One final try... any further ideas?

Thanks for any help!!
 

Users who are viewing this thread

Back
Top Bottom