I do want to present the query table itself, or I go to another dialog/multiselect. If the user clicks finish, we present the table, if the user clicks next, we go on to the next dialog/multiselect. What I have done is create a 9 step query application that walks a non-GIS user through a custom select. Building the query string via the loop is the key, I do this in each dialog, and simply just pull information from the new table. Thanks for your input, it did help me to get it working. If I come across any more problems or errors, I will try your suggestion below as an alternative. Thanks Again! Mike
-----Original Message----- From: Nabors, Steve [mailto:[EMAIL PROTECTED] Sent: Thursday, May 05, 2005 7:50 AM To: Mayer, Mike @ Vancouver Cc: [email protected] Subject: RE: MI-L MultiListBox Values OK, I see, you want to present the query table itself, not a second dialog/multiselect with the values in it. For that, I was going to suggest piping the values into another array via the loop and then make it the title of the second dialog\multiselect. Since the queried table is all you wanted, building the query string via the loop was the key. Glad its working. :-) -----Original Message----- From: Mayer, Mike @ Vancouver [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 4:37 PM To: Nabors, Steve Cc: '[email protected]' Subject: RE: MI-L MultiListBox Values Yes Steve, that is what I want to do....I figured out a way to do it, my code is below, a little different from what you suggested though.... '***************************** '* Declare and set variables * '***************************** Dim nWinID, nPos as Integer Dim str 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 create query, and a table to hold data * 'nPos = ReadControlValue(1) Do While nPos <> 0 str = str+","+""""+marrMunicipality(nPos)+"""" nPos = ReadControlValue(1) Loop str=Right$(str,len(str)-1) 'Note str '* If the user clicks finish, open the table, display and zoom to results in 'the map * Dialog Remove Run command "Select * from retailcomps_GC where Geographic_Locations = Any ("+str+") into QueryTable" Browse * from QueryTable Add Map Auto Layer QueryTable nWinId = WindowID(1) Set Map Window nWinID Zoom Entire Layer QueryTable End If -----Original Message----- From: Nabors, Steve [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 2:33 PM To: Mayer, Mike @ Vancouver Cc: [email protected] Subject: RE: MI-L MultiListBox Values I'm trying to understand your logic. Are you wanting to take selections made in the first multilistbox, put them into a new table, then present only those values in the new table in the second dialog/multilistbox? -----Original Message----- From: Mayer, Mike @ Vancouver [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 03, 2005 12:55 PM To: Nabors, Steve Subject: RE: MI-L MultiListBox Values Steve, Thank you for your response, I appreciate the input. I got it working, however, in theDescriptionTable, I only get one of the values (the last one) selected. Is there a way to add each item selected to the table so they all appear in the table. The reason for this is that I have another dialog which will open up once all the items selected are in a table. This new dialog will have multilistboxes that contain values from the columns in the theDescriptionTable. To further create a custom select. Am I making sense?? Thanks in advance. Mike -----Original Message----- From: Nabors, Steve [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 03, 2005 10:10 AM To: Mayer, Mike @ Vancouver Cc: [email protected] Subject: RE: MI-L MultiListBox Values 'Make your RetailMuniHandler Sub do something like the following 'Note that AnOpenTable is an open table that has a field called Description that has values in it matching 'marrMunicipality values dim Pos as integer Pos = ReadControlValue(1) 'Here we need a loop to hop thru each selection 'Before we do anything, check to see if they even checked anything, if not, send them back to the dialog If Pos = 0 then note "You must check at least one item to continue" Dialog Preserve 'Exit Sub Else 'cycle through the multiselect and load the data Do While Pos <> 0 Select * From AnOpenTable Where AnOpenTable.Description = marrMunicipality(Pos) Into theDescriptiontable 'Here is where you start building a selection string or directly doing something 'with the item selected in AnOpenTable via theDescriptionTable 'I chose to get a value from the FileName field and note it Fetch First from theDescriptiontable chosenitem = Rtrim$(LTrim$(theDescriptiontable.FileName)) note chosenitem 'reset Pos and loop again Pos = ReadControlValue(1) Loop Dialog Remove End If 'hope this helps -----Original Message----- From: Mayer, Mike @ Vancouver [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 4:06 PM To: '[email protected]' Subject: MI-L MultiListBox Values 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 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 16362 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 16374 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 16376
