Assuming you want to filter a form's recordset, try putting the following
code in the click event of your button...
me.filter = "YourField = " & textboxname.value 'if number
me.filter = "YourField = '" & textboxname.value & "'" 'if text
me.filter = "YourField = #" & format(textboxname.value,"mmm dd yyyy") & "#"
'if date
and then
me.filteron = true