Option to add where clause i.e. to quick search

The quicksearch searches ‘quick’ in the current table. In my case I would like to be able to restrict the search to a certain pool. Example: I have a table of all contactpersons belonging to companies. If I have selected a company I want to be able to do a quicksearch on persons of that company, not all companies. The table primary key is compId and personId.