Peter,
Here is a sub that reads a multilistbox.  I populate the multilistbox with an 
array, where the first 6 characters is a unique id, which is read here to 
find IDs of the selected items.  The first item in the multilistbox is "All", 
which is handled specially. The selections are stored in a new table for 
later use.
Let me know if you want to see the array-making code.

Mike
------------------------------------------------------------------------------

----------------------
Sub ReadMultiListBox301
    Dim iReadValue as Integer
    OnError GoTo BadClose
    Close Table SelectedBranches

    OnError GoTo 0
    Create Table SelectedBranches (BranchNo integer)
    Print "-"
    Do While 1 = 1
        iReadValue = ReadControlValue(301)
        
        If iReadValue = 0 Then
            Exit Do
        Else
            If iReadValue = 1 Then     'User has selected first item "ALL"
                Select * from BRANCHES 
                    Into BranchMapList
                    GoTo DoneSelecting  
                Exit Sub
            End If
            Insert Into SelectedBranches 
                Values ((val(left$(arrayBranches(iReadValue),6))))
        
        End If
    Loop

    '''Make selection of user's picks
    Select * from BRANCHES, SelectedBranches where 
BRANCHES.BranchNo=SelectedBranches.BranchNo into BranchMapList

    DoneSelecting:

    Exit Sub
    BadClose:
        Resume Next
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

''''''

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4814

Reply via email to