New topic: 

Multiple Combobox Selection

<http://forums.realsoftware.com/viewtopic.php?t=47584>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        Real2Real          Post subject: Multiple Combobox 
SelectionPosted: Sat Apr 13, 2013 10:27 am                         
Joined: Sat Apr 13, 2013 10:08 am
Posts: 1                Hello,

I have been searching for this particular solution and cannot seem to find the 
answer; or at least in plain text.

Scenario: I have two comboboxes:

1. Combobox1 - options are populated from a database table 'Region' (i.e., 
provinces/states)
2. Combobox2 - options are populated from a database table 'Region' (i.e. 
countries)

Table 'Region'
ID   Region_Province  Region_Country
1    New York       United States
2    California       United States
3    Maine         United States
4    Maine         England

I can populate and select the options in both comboxboxes separately but I want 
to accomplish the following interaction:
-> If Combobox1 is selected it will automatically populate combobox2 (I know 
this can be achieved with a RowTag/Event in Combobox if there is only one 
option) but if I select 'Maine' for example in combobox1 it does not populate 
combobox2 with two options 'United States and England' but only displays one 
option 'United States'.

I am having a hard time figuring is this a loop or a SQL statement?? And how?

Thanks!   
                             Top                Paul Lefebvre          Post 
subject: Re: Multiple Combobox SelectionPosted: Sun Apr 14, 2013 11:53 am       
                Site Admin                
Joined: Fri Sep 30, 2005 9:35 am
Posts: 955
Location: South Portland, Maine                In the Change event handler for 
ComboBox1, get the ID of the selected item (usually from the RowTag). Then use 
this ID in a SQL statement to get the data to populate ComboBox2.      
_________________
Paul Lefebvre
Developer Evangelist
Real Software, Inc.

The Real Studio Developer Conference is back: April 23rd-26th, 2013 in Orlando, 
FL.  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to