How do I?
See also
Add parameters to macros
- On the Navigation toolbar, select Layout Designer
.
- In the Layout Designer pane, in the Projects section, select a macro.
-
Click
and choose Properties.
- In the dialog box, on the Parameters tab, select one of the following:
- Add Parameter
- Add Local Variable
The Parameter Properties dialog box is displayed.
- For Parameter Type, choose one of the following:
- User Enter Value
- User Select From Query-based List
- User Select From Fixed List
- Local Variable
- For Name, type a name for the parameter.
- Parameter names must begin with an "@" symbol.
- Parameter names cannot include spaces or special characters.
- For Prompt, type the text that you want to display to the user running the macro.
- The prompt isn't specified for local variables.
- You can specify another parameter name for the prompt.
- For Data Type, choose one of the following:
- String
- Integer
- Float
- Date
- Boolean
- For Initial Value, do one of the following to specify a default:
- For the string, integer, or float data types, type a value.
- For the date data type, select
, and specify a date.
To allow editing of date values, select the Include Time Value When Editing Dates check box. - For the boolean data type, select or clear the Initial Value check box.
- If you want to allow users to not provide a value, select the Allow Nulls check box.
- If your users must choose a value from a query-based list, specify the query:
- On the Query tab, choose a connection.
- For Value, select
, and then construct the query.
- For Description, select
, and then construct the query.
- If you want to specify conditions for the list, in the Conditions section, select Add Statement, and then construct the query.
- If you want to sort the list, in the Sort By section, select Add Statement, and then construct the query.
- If you want to limit the number of list items, select the Only The First __ Records check box, and then type a number.
- If your users must choose a value from a fixed list, create the list:
- On the List tab, select Add Row.
An empty row is added to the Items section.
- In the Values column, select the row to activate the text field, and type a value.
- In the Description column, select the row to activate the text field, and type a description.
- Add more rows as needed.
- On the List tab, select Add Row.
- Click OK to close the Parameter Properties dialog box.
In the dialog box, a box is displayed for each parameter.
A visual identifier indicates the parameter and data type. - Click OK to close the dialog box.
- Click Save.
Last modified: Friday May 12, 2023
How do I?
See also