Share via


ForEachRecord Data Block

A ForEachRecord data block repeats a set of statments for each record in a domain.

Note

The ForEachRecord data block is available only in Data Macros.

Setting

The ForEachRecord action has the following arguments.

Argument

Required

Description

In

Yes

A string that identifies the domain of records to operate on. The In argument can contain the name of the table, a select query, or a SQL statement.

NoteNote
The specified domain cannot include data stored in a linked table or ODBC data source.

Where Condition

No

Astring expression used to restrict the range of data on which the ForEachRecord data block is performed. For example, criteria is often equivalent to the WHERE clause in an SQL expression, without the word WHERE. If criteria is omitted, the ForEachRecord data block operates on the entire domain specified by the In arument. Any field that is included in criteria must also be a field in In.

Alias

No

A string that provides an alternative name for the domain specified by the In argument. Often used to shorten the table name for subsequent references to prevent possible ambiguous references.If Alias is not specified, the table or query name will be used as the alias.

Remarks

Use the ExitForEachRecord action to exit a ForEachRecord data block immediately.