As far as I can tell, when you enter query mode, enter desired values there and execute a query. After detail records are fetched, go to the detail block, enter query mode again, enter values in detail block and execute a query once again.
That's what Forms built-in functionality does, and is by far the simplest way to do that.
You might, however, create a control block (i.e. non-database block) with all items customer would like to query and dynamically create DEFAULT_WHERE condition for both master and detail block. I believe this might work, but requires some coding. The first (default) approach requires nothing at all.
Well, create a VIEW by selecting all relevant columns from both tables and base your form on this view. You will not have a master-detail form any more, but you'll be able to enter query parameters for both tables at the same time.