A parameter Query is a query that asks you for one or more pieces of information before displaying the datasheet. A parameter query prompts the user to enter Parameters, or criteria through an input box, for selecting a set of records.
A parameter query is useful when there is a need to repeat the same query with different criteria. The criteria, is not constant as in the case of the simple query. While extracting the transactions to prepare ledger accounts, the same set of queries need to be executed for different account codes. Consider the following SQL statement.
PARAMETERS AccountName Text (255)
SELECT Name
FROM Accounts
WHERE Code = AccountNo
In the above query, the PARAMETERS clause is meant to declare the variable Account No. This SQL statement, when executed, prompts the user to provide the value of Account No.