There’s tons of good articles out there on this. Just a couple of notes, I had a customer asking me about filtering a subform in a datasheet view.
They were using Ctrl-F to bring up the Access find box which they were lamenting was not set to partial content by default.
I showed them using some other techniques that Access provides like right clicking in the text of the field and choosing a search option from there (one is Text > Contains…) and left clicking on the dropdown arrow in the column title to get a number of options.
The customer in this case was appreciative, but was hoping for something even faster. So I conjured up an unbound text box on the parent form labeled Part Number Filter and used the OnChange event to automatically enable and set the filter or disable it if the box was empty. In an Unbound box, the OnChange event requires you to use the .Text property of the control to get the current value of the box when it’s being changed.
Private Sub fltPartNumber_Change() Dim strFilter As String If Nz(Me.fltPartNumber.Text, "") <> "" Then strFilter = strFilter & _ "PartNumber Like '*" & Me.fltPartNumber.Text & "*' AND " End If Me.SubEditPartNumbers.Form.Filter = strFilter Me.SubEditPartNumbers.Form.FilterOn = Iif(strFilter = "" ,False ,True) End Sub