Venice
AnUnt::SeekByAccUnitKind
 
Seeks an Analytical Unit entry by its account, unit and kind.
 
VARIANT_BOOL SeekByAccUnitKind (
    enum eSeekMode eSeekMode,
    BSTR bsAccNum,
    BSTR bsUnit,
    BSTR bsKind,
    DATE dBookDate
)
 
Key information
This method uses key number 3 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pAccountBSTRAscendingCase sensitive
pAnaAccountBSTRAscendingHierarchy
pAnaKindBSTRAscendingHierarchy
pBookDateDATE (date)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsAccNum
[in] The general account of the analytical entry you want to seek.
bsUnit
[in] The analytical unit of the analytical entry you want to seek.
bsKind
[in] The analytical kind of the analytical entry you want to seek.
dBookDate
[in] The book date of the document of which you want to seek an analytical entry.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateAnUnt
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all analytical unit entries for the general account with number = '601', the analytical unit with code = 'UNIT' and the analytical kind with code = 'KIND'
CString strAccNum = "601", strUnit = "UNIT", strKind = "KIND";
pAnUnt->SeekByAccUnitKind (smGreaterOrEqual, (LPCSTR)strAccNum, (LPCSTR)strUnit, (LPCSTR)strKind, COleDateTime (0, 0, 0, 0, 0, 0).m_dt);
while (pAnUnt->GetDBStatus () == 0 && (CString)pAnUnt->pAccount == strAccNum && (CString)pAnUnt->pAnaAccount == strUnit && (CString)pAnUnt->pAnaKind == strKind)
{
    // Process record data
    
    pAnUnt->GetNext ();
}

C#
 
// Seek all analytical unit entries for the general account with number = '601', the analytical unit with code = 'UNIT' and the analytical kind with code = 'KIND'
string strAccNum = "601", strUnit = "UNIT", strKind = "KIND";
oAnUnt.SeekByAccUnitKind (eSeekMode.smGreaterOrEqual, strAccNum, strUnit, strKind, new DateTime ());
while (oAnUnt.GetDBStatus () == 0 && oAnUnt.pAccount.ToString () == strAccNum && oAnUnt.pAnaAccount.ToString () == strUnit && oAnUnt.pAnaKind.ToString () == strKind)
{
    // Process record data
    
    oAnUnt.GetNext ();
}

VBS
 
' Seek all analytical unit entries for the general account with number = '601', the analytical unit with code = 'UNIT' and the analytical kind with code = 'KIND'
Dim strAccNum, strUnit, strKind
Dim dtBookDate
strAccNum = "601"
strUnit = "UNIT"
strKind = "KIND"
Call oAnUnt.SeekByAccUnitKind(smGreaterOrEqual, strAccNum, strUnit, strKind, dtBookDate)
While oAnUnt.GetDBStatus() = 0 And oAnUnt.pAccount = strAccNum And oAnUnt.pAnaAccount = strUnit And oAnUnt.pAnaKind = strKind
    ' Process record data
    
    Call oAnUnt.GetNext()
Wend

VB.NET
 
' Seek all analytical unit entries for the general account with number = '601', the analytical unit with code = 'UNIT' and the analytical kind with code = 'KIND'
Dim strAccNum, strUnit, strKind As String
Dim dtBookDate As Date
strAccNum = "601"
strUnit = "UNIT"
strKind = "KIND"
oAnUnt.SeekByAccUnitKind(eSeekMode.smGreaterOrEqual, strAccNum, strUnit, strKind, dtBookDate)
While oAnUnt.GetDBStatus() = 0 And oAnUnt.pAccount = strAccNum And oAnUnt.pAnaAccount = strUnit And oAnUnt.pAnaKind = strKind
    ' Process record data
    
    oAnUnt.GetNext()
End While