Hi,
I would like to have a filter on a text box that will automatically update the filter everytime a character is entered in the box.
As well, I would like it to filter not on the whole field but any part of the field. For example..If the Product ID is "123456" and "34" is entered in the text box I would like that product to be in the filter.
I have this:
What should I do differently?
Thanks!
I would like to have a filter on a text box that will automatically update the filter everytime a character is entered in the box.
As well, I would like it to filter not on the whole field but any part of the field. For example..If the Product ID is "123456" and "34" is entered in the text box I would like that product to be in the filter.
I have this:
Code:
Private Sub txtcode_AfterUpdate()
Dim strFilter As String
strFilter = "1 = 1"
If Len(txtcode) > 0 Then
strFilter = strFilter & " AND code = '" & txtcode & "'"
End If
Me.Filter = strFilter
Me.FilterOn = True
End sub
What should I do differently?
Thanks!