Dynamic querys - which are the way to implement such an requirement - are the way to go. Using them allows you to pick up the filter criteria entered by the user and build your query dynamically at runtime.
They have been introduced into the language with Progress V9 ( 1998 ? ).
Heavy Regards, RealHeavyDude.