Retrieves the field number that comes after the specified field number in a table.
Function NextField(ByVal hTable As Long, ByVal FieldNo As Long) As Long
The handle to the table.
A field number. If this is set to zero, the first field number in the record is retrieved.
CF1.OpenTable hTable, 18
tmpLong = CF1.NextField(hTable, 0)
tmpVar = CF1.NextField(hTable, 0)
tmpLong2 = 1
While tmpLong <> 0
tmpLong = CF1.NextField(hTable, tmpLong)
tmpLong2 = tmpLong2 + 1
If VarType(tmpVar) = vbBoolean Then
logWr "Used NextField to scan through " & Trim$(Str$(tmpLong2)) & " fields in the customer table."
logWr "NextField Failed"
NextField returns the field number that comes after FieldNo. If the function reaches the end of the field number list, zero is returned.
NextField can scan the entire list of fields in a table. The scan is restricted to the active fields and excludes the inactive ones.
For more information about active and inactive fields, see the Application Designer's Guide.