The results of the query can be displayed in a grid. Listing 1 displays the code in the Do It button. Assign the SQL property the memo's text. Most users, however, do not. So your job as the developer is to provide an interface and construct the SQL statement.
Dynamic queries allow the usage of parameters.
When you want to test or set a default value for the parameter, select the Params property of Query1. This presents the parameters dialog. Select the parameter DeptNo. Then select Integer from the data type drop-down list. To set a default, make an entry in the Value edit box.