AddParameters Command (DDE)

Microsoft Query

AddParameters Command (DDE)

Adds a parameter to the active query for use by PivotTable reports.

Syntax

AddParameters(field1, field2, …)

field1, field2, … The names of table columns that should be added to the criteria as parameters. The names of the new parameters are defined to be the names of the fields themselves. If you specify a field name that isn't available in the active query, an error occurs.

Remarks

AddParameters can be used even when entering parameters is disabled in Microsoft Query.

The modified SQL string can be returned by requesting the ODBCSQLStatement item.

To reset parameters, you must reset the entire SQL string.