Filtering Data Using a Query Prompt

When you need the ability to provide filter criteria at print-time, you can use the Database Setup dialog to create a query prompt that appears each time the document is printed, allowing the user to enter criteria for a database search. Only records that match the entered text will be printed.

Query prompts are useful when you want the print operator to be able to print specific filtered records "on the fly." For example, suppose you run a shipping company where you want to give the print operator the ability to print shipping labels based on the city of the recipient. To do this, you would use the Filter property page of the Database Setup dialog to create a filter condition where the "City" field from the database equals a query prompt. At print-time, a query prompt dialog is then displayed, allowing the print operator to enter the city name. Only records that contain City fields that equal the name of the entered city will be printed. On the Filter property page of the Database Setup dialog, your query prompt might look like this:

City Equals ?CityPrompt

In This Section