Method
Counts the keys that are available in a table.
Category
Keys
Syntax
Function KeyCount(ByVal hTable As Long) As Short
hTable
The handle to the table.
Example
CF1.OpenTable hTable, 18
tmpVar = CF1.KeyCount(hTable)
If VarType(tmpVar) = vbInteger Then
logWr "KeyCount returned " & tmpVar & " keys"
Else
logWr "KeyCount failed"
End If
CF1.CloseTable hTable
Comments
KeyCount returns the number of keys that have been defined for
a table. A table always has one primary key and may have one or
more secondary keys. Therefore, KeyCount always returns a number
greater than or equal to one. Only active keys are counted.
For more information about keys, see the Application Designer's Guide.