Method
Retrieves the field number that comes after the specified field
number in a table.
Category
Fields
Syntax
Function NextField(ByVal hTable As Long, ByVal FieldNo As Long) As
Long
hTable
The handle to the table.
FieldNo
A field number. If this is set to zero, the first field number in
the record is retrieved.
Example
'case "NextField"
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
Wend
If VarType(tmpVar) = vbBoolean Then
logWr "Used NextField to scan through " & Trim$(Str$(tmpLong2)) & " fields in the customer table."
Else
logWr "NextField Failed"
End If
Comments
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.