Fields, Parameters and Expressions > True DataControl Parameters > Accessing Parameter Values in Code |
You can access a Parameter object can by indexing the collection returned by the Parameters property with either the parameter name or the zero-based ordinal position in the collection.
To get or set a parameter’s value in code, use the Value property of the Parameter object:
Example Title |
Copy Code
|
---|---|
' Retrieve the value of the parameter Par1 variable = TData1.Parameters("Par1").Value ' Set the value of the parameter Par1 TData1.Parameters("Par1").Value = variable |
Since Value is the default property of the Parameter object, it can be omitted:
Example Title |
Copy Code
|
---|---|
variable = TData1.Parameters("Par1") TData1.Parameters("Par1") = variable |