FieldCount

Method
Counts the number of fields (columns) in a table.

Category
Fields

 

Syntax
Function FieldCount(ByVal hTable As Long) As Short

hTable
The handle to the table.

 

Example

'Case "FieldCount"

'Count the fields in Customer-table

  CF1.OpenTable hTable, 18

  tmpVar = CF1.FieldCount(hTable)

  If VarType(tmpVar) = vbInteger Then

  logWr "No. of fields in the customer table: " & Str$(tmpLong)

  Else

  logWr "Fieldcount failed"

  End If

  CF1.CloseTable hTable

 

Comments
FieldCount retrieves the number of fields in a record in a given table. Only active fields are counted.



© 2009 Microsoft Corporation. All rights reserved.