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.
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.