Project::SeekByOpenFrm (Interface: Project)
 
Seeks an open Project by its firm.
 
VARIANT_BOOL SeekByOpenFrm (
    enum eSeekMode eSeekMode,
    enum eFirmType eFirmType,
    LONG lFrmNum,
    LONG lFrmSubNum,
    LONG lNumber
)
 
Key information
This method uses key number 4 (See SwapKey).
This is a unique key.
This is a null key, only the records where pClosed is false are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pFrmTypeBYTEAscending-
pFrmNumLONG (unsigned)Ascending-
pFrmSubNumLONG (unsigned)Ascending-
pNumberLONG (unsigned)Ascending-
pClosedVARIANT_BOOLAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
eFirmType
[in] A value of the 'eFirmType' enumeration.
lFrmNum
[in] The number of the firm that the project you want to seek is assigned to.
lFrmSubNum
[in] The subnumber of the firm that the project you want to seek is assigned to.
lNumber
[in] The number of the project you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateProject
 
Samples
 
C++
 
// Seek all open projects for supplier with number 125/0
eFirmType eFT = ftSupplier;
DWORD dwFrmNum = 125, dwFrmSubNum = 0;
pProject->SeekByOpenFrm (smGreater, eFT, dwFrmNum, dwFrmSubNum, 0);
while (pProject->GetDBStatus () == 0 && pProject->pFrmType.bVal == eFT && pProject->pFrmNum.lVal == dwFrmNum && pProject->pFrmSubNum.lVal == dwFrmSubNum)
{
    // Process record data
    
    pProject->GetNext ();
}

C#
 
// Seek all open projects for supplier with number 125/0
eFirmType eFT = eFirmType.ftSupplier;
int iFrmNum = 125, iFrmSubNum = 0;
oProject.SeekByOpenFrm (eSeekMode.smGreater, eFT, iFrmNum, iFrmSubNum, 0);
while (oProject.GetDBStatus () == 0 && (eFirmType)Enum.ToObject(typeof(eFirmType), oProject.pFrmType) == eFT && (int)oProject.pFrmNum == iFrmNum && (int)oProject.pFrmSubNum == iFrmSubNum)
{
    // Process record data
    
    oProject.GetNext ();
}

VBS
 
' Seek all open projects for supplier with number 125/0
Dim eFT
Dim dwFrmNum, dwFrmSubNum
eFT = ftSupplier
dwFrmNum = 125
dwFrmSubNum = 0
Call oProject.SeekByOpenFrm(smGreater, eFT, dwFrmNum, dwFrmSubNum, 0)
While oProject.GetDBStatus() = 0 And oProject.pFrmType = eFT And oProject.pFrmNum = dwFrmNum And oProject.pFrmSubNum = dwFrmSubNum
    ' Process record data

    Call oProject.GetNext()
Wend

VB.NET
 
' Seek all open projects for supplier with number 125/0
Dim eFT As eFirmType
Dim ulFrmNum, ulFrmSubNum As ULong
eFT = eFirmType.ftSupplier
ulFrmNum = 125
ulFrmSubNum = 0
oProject.SeekByOpenFrm(eSeekMode.smGreater, eFT, ulFrmNum, ulFrmSubNum, 0)
While oProject.GetDBStatus() = 0 And oProject.pFrmType = eFT And oProject.pFrmNum = ulFrmNum And oProject.pFrmSubNum = ulFrmSubNum
    ' Process record data

    oProject.GetNext()
End While