Hi
The DLookup function will do just that.
For example:
If you have a table named ATable with two fields:
TheFieldYouWant field and TheFilterField field
and a query named qry1
qry1="SELECT ATable.TheFieldYouWant, ATable.TheFilterField FROM ATable;"
On a form you have a textbox named text1 and a commandbutton named COPYBttn
The following code in the onClick event of COPYbttn will put the filtered results into text1:
Dim aFld
aFld = DLookup("[TheFieldYouWant]", "qry1", " [TheFilterField] ='AFilterCriterion'")
Me!Text1 = aFld
Hope this helps.