An Access form has a
Filter
and an
FilterON
property. Just need to set the
FilterOn
to True and the
Filter
property to the text as would appear in a SQL Where clause (ie,
Company LIKE "C*"
).
Me.Filter = "Company LIKE """ + CompanyFilter.Text + """"
Me.FilterOn = True
This should also work fine when form only shows a single record, or when it shows many records.