Retrieves the subform execution mode. This information is required to let the developer condition the logic of the subform task to the mode of execution.
Syntax:
SubformExecMode(generation)
Parameters:
generation – A number that represents the task's hierarchic position in the runtime task tree. 0 represents the current task, 1 its immediate ancestor, and so on.
Returns:
The return values are:
-1 – The task is not executed as a subform
0 – The task is executed by setting the focus on it
1 – The subtask is executed for the first time
2 – The task is executed because the Automatic Refresh property or the Subform Refresh event has been triggered.
Example:
SubformExecMode (0) returns 1 if the subform task has been called for the current task for the first time.