Venice
AccProp::SwapKey
 
Swaps the file to another key.
 
VARIANT_BOOL SwapKey (
    SHORT sKeyNum
)
 
Parameters
sKeyNum
[in] The number of the key by which you want the file positioned.
 
Return value
True if the file was positioned according to the given key, otherwise false (e.g. if the current record is a null value for the given key or if an invalid sKeyNum was supplied).
 
See Also
CreateAccProp
Browse
View
The possible keys (and their numerical value) can be found in the SeekBy-methods of this interface.
 
Samples
 
C++
 
// Browse for an accounting proposal, which positions the file by a key that is unknown
pAccProp->Browse (VARIANT_FALSE);
// Swap the key to 'APH_COD' (1), positioning by type and code
pAccProp->SwapKey (1);
// Show the selected accounting proposal (you can then navigate through the file using the key 'APH_COD')
pAccProp->View ();

C#
 
// Browse for an accounting proposal, which positions the file by a key that is unknown
oAccProp.Browse (false);
// Swap the key to 'APH_COD' (1), positioning by type and code
oAccProp.SwapKey (1);
// Show the selected accounting proposal (you can then navigate through the file using the key 'APH_COD')
oAccProp.View ();

VBS
 
' Browse for an accounting proposal, which positions the file by a key that is unknown
Call oAccProp.Browse(False)
' Swap the key to 'APH_COD' (1), positioning by type and code
Call oAccProp.SwapKey(1)
' Show the selected accounting proposal (you can then navigate through the file using the key 'APH_COD')
Call oAccProp.View()

VB.NET
 
' Browse for an accounting proposal, which positions the file by a key that is unknown
oAccProp.Browse(False)
' Swap the key to 'APH_COD' (1), positioning by type and code
oAccProp.SwapKey(1)
' Show the selected accounting proposal (you can then navigate through the file using the key 'APH_COD')
oAccProp.View()