Hello Everyone,
Looks like I need a little help from you programmers out there again. I
have created an application that creates a custom query wizard to help walk
a non-GIS user through a series of steps to create a select statement and
display some information. I get the user to select information from a
multilistbox. I then take that selected info to create the query. The
problem I am having is that I get the user results from the multilistbox,
and put the results into a table. this works fine for one selection.
However, when the user makes multiple selections, I can only get the first
selection into the table, not the rest. I can get the program to read
through each selection in the multilistbox, but I can't get each selection
into the "QueryTable" that I create. My code for the button handler is
below.
Sub RetailMuniFinishHandler
Dim nPos, nWinID as Integer
Dim szChosenItem as String
nPos = ReadControlValue(1)
If nPos = 0 Then
Note "You must select at least one item to continue!"
Dialog Preserve
Else
'* Cycle through the multiselect and load the data *
Do While nPos <> 0
Select * From retailcomps_GC Where
retailcomps_GC.Geographic_Locations =
marrMunicipality(nPos)
into QueryTable
Fetch First from QueryTable
szChosenItem =
Rtrim$(LTrim$(QueryTable.Geographic_Locations))
'Note szChosenItem
nPos = ReadControlValue(1)
Loop
'* If the user clicks finish, open the table, display and
'zoom to results in the map *
Dialog Remove
Browse * from QueryTable
Add Map Auto Layer QueryTable
nWinID = WindowID(1)
Set Map
Window nWinID
Zoom Entire Layer QueryTable
End If
End Sub
Any suggestions are greatly appreciated. Thanks in advance.
Mike Mayer
(GIS Practicum Student, getting closer......)
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16359