Method
Retrieves the key currently assigned to a table.
Category
Keys
Syntax
Function GetCurrentKey(ByVal hTable As Long) As Variant
hTable
The handle to the table.
Example
'getCurrentKey
'GetCurrentKey only returns the first key so this
'code will fail.
tmpVar2 = CF1.GetCurrentKey(hTable)
If False Then 'VarType(tmpVar2) = vbArray + vbLong Then
If (tmpVar <> tmpVar2) Then
logWr "getCurrentKey failed"
Else
logWr "getCurrentKey OK"
End If
Else
logWr "GetCurrentKey failed. It didn't return an array"
End If
CF1.CloseTable hTable
Comments
GetCurrentKey returns a list of the fields comprising the current
key. The field list will equal the key set by a prior call to
SetCurrentKey. If SetCurrentKey has not been called,
the current key is the primary key.