brBOL property

Returns a value that indicates whether the current position is on the first element in the list

Syntax

bValue = object.brBOL

Parameters

Parameter Description
bValue The return value is a Boolean data type that is True if the current position is on the first element in the list.
object An object variable that represents a clsD3SelectList object.

Remarks

If both brBOL and brEOL return True, then the clsD3SelectList object is in an uninitialized state. The brBOL and brEOL properties are not valid until after the first brReadnext.

Example

Private Sub TestList_Click()
   Dim oList As clsD3SelectList
   Dim sCurrent As String
   Dim i As Integer
 
   OpenConnection ' Subroutine to establish connection
 
   Set oList = oConn. brOpenSelectList(" select products")
   oList.brReadnext
   MsgBox "This list was produced by the command " & oList.brName
   MsgBox "The first item is " & oList.brItemId
 
   Do While True
      Select Case InputBox("N for next, P for previous")
         Case "N"
            If oList.brEOL Then
            MsgBox "End of list" 
            Else
            oList.brReadnext 
            If oList.brEOL Then 
            MsgBox "End of list" 
   Else
            MsgBox "The next item is " & oList.brItemId 
            End If 
            End If
 
         Case "P"
            If oList.brBOLThen
               MsgBox "At beginning of list" & _ 
               " - The first item is" & oList.brItemId 
            Else
               ‘ Save current position 
               sCurrent = oList.brItemIndex 
               ' Since the select list can be read only in a 
               ' forward direction, begin reading from top 
               oList.brReselect 
               ' Read items up to one less than current 
               For i = 1 To sCurrent - 1 
               oList.brReadnext 
               Next i 
               MsgBox "The previous item is " & oList.brItemId 
            End If
 
         Case Else
            Exit Do
 
      End Select
   Loop
 
   oConn.brCloseSelectList oList
   CloseConnection ' Subroutine to close connection
End Sub