Hello,
I have a form where I have users enter text into a text box then press a button that filters the form based on the text entered into the box. When the user presses the button, the filter is applied as expected but the filter is also being applied to the subform which is not intended. To "fix" this I use the following code to turn off the filter on the subform.
Private Sub TFilterBtn_Click()
Me.Filter = "[DocumentTitle] LIKE" & Chr(34) & "*" & TitleFilterbx.Value & "*" & Chr(34)
Me.FilterOn = True
With RevisionSubF.Form
'.Filter = vbNullString
.FilterOn = False
.OrderBy = "[RevisionSubF].[Superseeded] DESC"
.OrderByOn = True
End With
Me.Requery
End Sub
Is there a way to only have the FilterOn = True apply to the main form and not the subform so that I don't have to use code to clear the filter for every subform and redefine the OrderBy which gets cleared during the process?
Thanks in advance.