In the header of a split form I have a few text boxes each with their own filter button. In the click event for each of these filter buttons, I have code that looks like this:
Me.Filter = "[Citation Num] Like '*" & Me.txtCitNumFilter & "*'"
Me.FilterOn = True
Me.Requery
Me.txtCitNumFilter.SetFocus
Now I would like to have another button that will filter all at once. It will take everything typed into each text box that is filled and filter them simultaneously but I am having issues figuring out how to write the code for it. I have tried these with no luck:
Me.Filter = "[Citation Num] Like '*" & Me.txtCitNumFilter & "*'"
Me.Filter = "[Clerk] Like '*" & Me.txtClerkFilter & "*'"
Me.FilterOn = True
Me.Requery
Me.txtCitNumFilter.SetFocus
This one just filters the clerk and totally ignores the citation number and so I tried these:
Me.Filter = "[Citation Num] Like '*" & Me.txtCitNumFilter & "*'" And _
Me.Filter = "[Clerk] Like '*" & Me.txtClerkFilter & "*'"
Me.FilterOn = True
Me.Requery
Me.txtCitNumFilter.SetFocus
Me.Filter = "[Citation Num] Like '*" & Me.txtCitNumFilter & "*'"
Me.FilterOn = True
Me.Filter = "[Clerk] Like '*" & Me.txtClerkFilter & "*'"
Me.FilterOn = True
Me.Requery
Me.txtCitNumFilter.SetFocus
Both of these did not work either. What am I missing here? Can someone please help? Thanks.