Search notes:

Access: DoCmd.ApplyFilter

doCmd.openTable   "contracts"
docmd.applyFilter "contracts", "contract_nr = '81845'"
If the first argument is omitted, the filter is applied to the active object that has the focus:
docmd.applyFilter , "contract_nr = '81845'"

See also

DoCmd.SetFilter and DoCmd.ShowAllRecords.
After applying a filter, the records can be ordered (sorted) with DoCmd.SetOrderBy.
DoCmd.findRecord
The DoCmd object

Index