here's some instructions you can follow to build a quick "demo" for
yourself, to see how it works. then, if it suits your needs, you can adapt
it for your "real" work.
create a new table in your db (or a copy of your db), and call it TableOne.
add 3 fields to the table, and name them FieldA, FieldB and FieldC.
create a new form, bound to TableOne, and call it frmOne.
create another form, but don't bind it to any table, and call it
frmSearchOne. in Design view, add 3 textbox controls, and name them txtA,
txtB and txtC. add a subform control, and name it ChildOne. set its'
SourceObject property to frmOne. add a command button, and name it
cmdFilter. add macro or VBA code to the button's Click event, to requery the
subform, as
Me!ChildOne.Form.Requery
save and close frmSearchOne. open frmOne in Design view, and go to the
RecordSource property. click on the ellipsis (...) button at the right of
the property line; that will take you into a view that looks just like a
query's Design view. TableOne should already show in the top half of the
window; if it doesn't, then add it. add fields FieldA, FieldB and FieldC to
the grid. add criteria to FieldA, as
[Forms]![frmSearchOne]![txtA] or [Forms]![frmSearchOne]![txtA] Is Null
add the same criteria to FieldB, changing the control name from txtA to
txtB, and then again to FieldC, using txtC. note, if you want to be able to
search for a *partial* value, then change the criteria to
Like "*" & [Forms]![frmSearchOne]![txtA] & "*" or
[Forms]![frmSearchOne]![txtA] Is Null
close and save the "query design" window.
next, add a macro or VBA code to the form's Load event, as
On Error Resume Next
DoCmd.RunCommand acCmdRecordsGoToNew
save and close frmOne.
okay, now, when you open frmSearchOne, all the records in TableA will be
loaded to the subform, and the subform focus will be on the NewRecord line.
the user can enter a value in any combination of the 3 textboxes, and then
click the command button. the subform will be requeried, using the value(s)
entered, and return the records that match. to see all the records again,
clear the textboxes and click the requery button again; it's useful to add a
command button to "reset" those controls to Null all at once, as
Me!txtA = Null
Me!txtB = Null
Me!txtC = Null
hth