|
Browses the file for an Analytical Centre entry. |
|
|
LONG Browse ( VARIANT_BOOL bFromCurrPos ) |
|
|
Parameters | bFromCurrPos | [in] When this parameter is set to true the browse will use the current position of the file and the key that was set by the previous SeekBy-method. If the parameter is false the browse will be positioned at the beginning of the file and the key will be the last one that was manually selected in the browse. | | Return value |
A LONG containing the system number of the selected record, 0 if no record was selected. | | Remarks |
| This method can only be used if user interface is allowed (parameter bWithUserInterface is set to true in the Logon method), because a record can only be selected using the browse dialog. |
|
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
CString strCentre = "CENT", strKind = "KIND", strAccNum = "601";
long lSysNum;
if (pAnCnt->SeekByCentreKindAcc (smGreaterOrEqual, (LPCSTR)strCentre, (LPCSTR)strKind, (LPCSTR)strAccNum, COleDateTime (0, 0, 0, 0, 0, 0).m_dt) &&
(CString)pAnCnt->pAnaAccount == strCentre && (CString)pAnCnt->pAnaKind == strKind && (CString)pAnCnt->pAccount == strAccNum)
// Browse using the key 'ACN_AKC' (centre - kind - account) and positioned on the record found by SeekByCentreKindAcc
lSysNum = pAnCnt->Browse (VARIANT_TRUE);
else
// Browse using the last key that was manually selected and positioned at the beginning of the file
lSysNum = pAnCnt->Browse (VARIANT_FALSE);
|
|
|
C# |
|
string strCentre = "CENT", strKind = "KIND", strAccNum = "601";
int iSysNum;
if (oAnCnt.SeekByCentreKindAcc (eSeekMode.smGreaterOrEqual, strCentre, strKind, strAccNum, new DateTime ()) &&
oAnCnt.pAnaAccount.ToString () == strCentre && oAnCnt.pAnaKind.ToString () == strKind && oAnCnt.pAccount.ToString () == strAccNum)
// Browse using the key 'ACN_AKC' (centre - kind - account) and positioned on the record found by SeekByCentreKindAcc
iSysNum = oAnCnt.Browse (true);
else
// Browse using the last key that was manually selected and positioned at the beginning of the file
iSysNum = oAnCnt.Browse (false);
|
|
|
VBS |
|
Dim strCentre, strKind, strAccNum
Dim dtBookDate
strCentre = "CENT"
strKind = "KIND"
strAccNum = "601"
If oAnCnt.SeekByCentreKindAcc(smGreaterOrEqual, strCentre, strKind, strAccNum, dtBookDate) And oAnCnt.pAnaAccount = strCentre And oAnCnt.pAnaKind = strKind And oAnCnt.pAccount = strAccNum Then
' Browse using the key 'ACN_AKC' (centre - kind - account) and positioned on the record found by SeekByCentreKindAcc
lSysNum = oAnCnt.Browse(True)
Else
' Browse using the last key that was manually selected and positioned at the beginning of the file
lSysNum = oAnCnt.Browse(False)
End If
|
|
|
VB.NET |
|
Dim strCentre, strKind, strAccNum As String
Dim dtBookDate As Date
Dim lSysNum As Long
strCentre = "CENT"
strKind = "KIND"
strAccNum = "601"
If oAnCnt.SeekByCentreKindAcc(eSeekMode.smGreaterOrEqual, strCentre, strKind, strAccNum, dtBookDate) And oAnCnt.pAnaAccount = strCentre And oAnCnt.pAnaKind = strKind And oAnCnt.pAccount = strAccNum Then
' Browse using the key 'ACN_AKC' (centre - kind - account) and positioned on the record found by SeekByCentreKindAcc
lSysNum = oAnCnt.Browse(True)
Else
' Browse using the last key that was manually selected and positioned at the beginning of the file
lSysNum = oAnCnt.Browse(False)
End If
|
|