Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing a Filter on a Subform

Status
Not open for further replies.

Hmadyson

Programmer
Mar 14, 2001
202
US
I have a 2 subforms on a main form. I have various routines that set the filter in both forms similtaneously. This all works fine and dandy, but one of my subforms does not seem to turn the filter off when I want it to. This is the code that I am using. The subform is called fsubPast

With Me.fsubPast.Form
.Filter = FilterString
If Len(FilterString) > 0 Then
.FilterOn = True
Else
.FilterOn = False
End If
.Requery
End With

When it does not work Filterstring="". I have watched what is happening, and the debug window says that these setting has been changed appropriately, but as long as the last filter removed all records, it will not unfilter. I can right click on the subform and remove the filter by hand. This is very odd.

Thanks for your help.
 
oh yeah, resetting the filter to anything else will work fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top