Mike,

The typical mistake here is that the value in the "into-variariable" contains 
the index of the selected item, not the "real" value of this. So you  need to 
use the "into"variable" to get the value from you array of municipalites.


Dim     arrMuniNames(), szMuni As String,
                nMuniItem As Integer

Dialog
        '...some dialog statement

        '...some controls

        Control PopupMenu
                Title From Variable arrMuniNames
                Into nMuniItem

        '...some more controls

        szMuni = arrMuniNames(nMuniItem)

        Select * From MUNITABLE
                Where MUNINAME = szMuni

        If SelectionInfo(SEL_INFO_NROWS) > 0 Then
                Browse * From Selection
        End if

Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel     +45 6311 4900
Direct  +45 6311 4908
Mob     +45 5156 1045
Fax     +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-----Original Message-----
From: Mayer, Mike @ Vancouver [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 25, 2005 7:22 PM
To: '[email protected]'
Subject: MI-L Pop-Up Menu values


Hello Everyone,
I have a problem where I am trying to retrieve a value from a highlighted 
option within a pop-up menu control.  Basically, I have a custom dialog with a 
pop-up menu containing different municipalities.  The values in the pop-up menu 
are read from a table column.  Once the user selects a municipality, I want to 
take the selected value and put that into a variable to be used in a select 
statement.  I have tried using the 'into <var name>' command but get no luck.  
Basically, when the select statement executes, I get no values in the newly 
created browser table.  However, if I hard-code in a municipality name, the 
select statements works, but when trying to use a variable instead of the 
actual name, I get no results in the browser table.  Any suggestions??

Mike Mayer
(GIS practicum student seeking help....)

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


Reply via email to