Hello Everyone,
I need some help from all you programmers out there.  I have a MultiListbox
that is populated from an array which reads values from a column in a table.
I need a way to get the values the user selects from the MultiListBox.  I
need to take these values to create a select statement.  I know I must use
the ReadControlValue() function and create a loop to read each item the user
selected. How do I go about doing this?? My code for the dialog, thus far,
looks like this:

'*********************************************************************
'* Function: RetailMuniSelect                                        *
'* Purpose: Pops up a dialog prompting user for which                *
'*          municipality they want to query in the retail comps DB   *
'*********************************************************************
Sub RetailMuniSelect

        
'*********************************************************************
        '** Create a unique list of municipality names, sorted alphbetically
*
        
'*********************************************************************
        Dim m, p as Integer
        Select Geographic_Locations from retailcomps_GC order by
Geographic_Locations group by Geographic_Locations into TMP
        p = TableInfo(TMP, TAB_INFO_NROWS)
        redim marrMunicipality(p)
        for m = 1 to p
                fetch rec m from TMP
                marrMunicipality(m) = TMP.Geographic_Locations
        next

        '***************************************************
        '** Open a dialog to select a muni for retailcomps *
        '***************************************************
        Dialog
                Title "2. Select Municipality"
                Width 210 Height 100
                Control StaticText
                        Title "Municipality: "
                        Position 15, 10
                Control MultiListBox
                        Title from variable marrMunicipality
                        Position 60, 10 Width 100 Height 60
                        ID 1
                Control OKButton
                        Position 65, 80
                        Calling RetailMuniHandler
                Control CancelButton
                        Position 115, 80
                        If Not CommandInfo(CMD_INFO_DLG_OK) Then        
                                Exit Sub
                        End If
End Sub

'***********************************************************
'* Function: RetailMuniHandler                             *
'* Purpose: Handles the OK button for the RetailMuniSelect *
'***********************************************************
Sub RetailMuniHandler

        'Use ReadControlValue() and create a loop to read the values

End Sub

Any input/help is greatly appreciated.

Mike Mayer
(A frustrated GIS Practicum Student.....)



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

Reply via email to