not clear on your setup. do you have a form bound to a
table or query, and want to filter the form records when
the user clicks a command button?
if so, open the form in design view, click on the Filter
property line (right below the RecordSource line), then
press F1 to see the Help topic. after reading up on the
Filter property, just put your
Me.Filter = ...
Me.FilterOn = True
code in the command button's OnClick event procedure.
there are other ways to filter a form's records, depending
on the situation. if the above doesn't suit, post back
with more detail on your setup.