Venice
Entry::Browse
 
Browses the file for an Entry record.
 
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
CreateEntry
SeekByDocNum
 
Samples
 
C++
 
CString strBook = "VAT";
long lDocNum = 12, lSysNum;
eBookType eBT = btSndry;
if (pEntry->SeekByDocNum (smGreaterOrEqual, eBT, (LPCSTR)strBook, lDocNum, 0) &&
    (BYTE)pEntry->pBookType == eBT && (CString)pEntry->pBook == strBook && (long)pEntry->pDocNum == lDocNum)
    // Browse using the key 'ENT_DOC' (document number) and positioned on the record found by SeekByDocNum
    lSysNum = pEntry->Browse (VARIANT_TRUE);
else
    // Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = pEntry->Browse (VARIANT_FALSE);

C#
 
string strBook = "VAT";
int iDocNum = 12, iSysNum;
eBookType eBT = eBookType.btSndry;
if (oEntry.SeekByDocNum (eSeekMode.smGreaterOrEqual, eBT, strBook, iDocNum, 0) &&
    (eBookType)((byte)oEntry.pBookType) == eBT && oEntry.pBook.ToString () == strBook && (int)oEntry.pDocNum == iDocNum)
    // Browse using the key 'ENT_DOC' (document number) and positioned on the record found by SeekByDocNum
    iSysNum = oEntry.Browse (true);
else
    // Browse using the last key that was manually selected and positioned at the beginning of the file
    iSysNum = oEntry.Browse (false);

VBS
 
Dim strBook
Dim lDocNum, lSysNum
Dim eBT
strBook = "VAT"
lDocNum = 12
eBT = btSndry
If oEntry.SeekByDocNum(smGreaterOrEqual, eBT, strBook, lDocNum, 0) And oEntry.pBookType = eBT And oEntry.pBook = strBook And oEntry.pDocNum = lDocNum Then
    ' Browse using the key 'ENT_DOC' (document number) and positioned on the record found by SeekByDocNum
    lSysNum = oEntry.Browse(True)
Else
    ' Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = oEntry.Browse(False)
End If

VB.NET
 
Dim strBook As String
Dim lDocNum, lSysNum As Long
Dim eBT As eBookType
strBook = "VAT"
lDocNum = 12
eBT = eBookType.btSndry
If oEntry.SeekByDocNum(eSeekMode.smGreaterOrEqual, eBT, strBook, lDocNum, 0) And oEntry.pBookType = eBT And oEntry.pBook = strBook And oEntry.pDocNum = lDocNum Then
    ' Browse using the key 'ENT_DOC' (document number) and positioned on the record found by SeekByDocNum
    lSysNum = oEntry.Browse(True)
Else
    ' Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = oEntry.Browse(False)
End If