Retrieves the numbers of the fields specified by an array of field names.
Function FieldNoArray(hTable As Long, FieldNameArray As Variant) As Variant
The handle to the table.
The array of the names of the fields whose numbers are to be retrieved.
FieldNoArray returns an array with the field numbers that correspond to the fields named in FieldNameArray.
Each field is uniquely identified by both a number and a name. Two fields in the same table cannot have the same number or name - this is checked when fields are created in C/SIDE.
Fields are normally accessed by number because the random access used for numbers is faster than the sequential scan used for names. Therefore, you should only call FieldNoArray to look up the numbers of fields if your system does not support field numbers, and there is no alternative.
If a name in the FieldNameArray does not exist, an exception is raised.
See also FieldNo and GetFieldDataArray.