Topic: SQL Query in ComboBox referring to another Combobox Result

Hi everybody,

I am in trouble trying to assign an SQL Query to a Combobox using the choice of another Combobox.

I have 2 tables

Ports                                                                                                                      Switches
id | id_Switches | Ports    | id_VLANS | id_Status                                                id | Hostname    | etc....
1  |           1        | Gi1/0/1 |         1       |         1                                                       1 | Hostname1 |
2  |           1        | Gi1/0/2 |         6       |         1                                                       2 | Hostname2 |
3  |           1        | Gi1/0/3 |         4       |         2                                                       3 | Hostname3 |



In Combobox 1, I choose the switch Hostname and in Combobox, I would like to be able to choose only 1 port for filtering

How could I do this without entering thousands of entries in a new column in Ports?


The proper SQL Query should be :

select p.ports,p.id
from switches s
left join ports p on s.id=p.id_Switches
where s.id=+Choice of Combobox 1+

Re: SQL Query in ComboBox referring to another Combobox Result

If I understanding correctly you need linked list, here you can file the example:
http://myvisualdatabase.com/forum/viewtopic.php?id=1425

Dmitry.

Re: SQL Query in ComboBox referring to another Combobox Result

Kind of,

when using this example, I have the ports listed but it does not filter the results in the grid for searching. I already sent you my project some days ago smile

Re: SQL Query in ComboBox referring to another Combobox Result

tcoton
Please send me your project again to support@drive-software.com

Dmitry.

Re: SQL Query in ComboBox referring to another Combobox Result

For the sake of other users lokking for similar feature, Dmitry sent to me version 1.53 beta and it works. smile

Thanks Dmitry!