Returns the number of the current record in a Table control based on a data file.
Remark: TableRecNum can be used on a single-selection or multi-selection Table control.
// Current record number in the "TABLE_ProductTable" control
ResRecNum = TableRecNum(TABLE_ProductTable)
<Result> = TableRecNum(<Table control>)
- Current record number in the data file linked to the Table control,
- 0 if there is no current row or if the current row is not saved yet in the data file linked to the Table control.
<Table control>: Control name
Name of the Table control to be used.
If this parameter corresponds to an empty string (""), the control used will be the Table control to which the current event belongs.
- If the query was run with the hWithFilter constant (option checked in the query editor), TableRecNum returns the number of the current record in the query.
- If the query was run without the hWithFilter constant, TableRecNum returns an undefined result.