4 Attachment(s)
Synchronized two combobox
Hi
I have a table and I must to populate two combobox with data from this
Example data from my table
Attachment 143349
The column UF I must to populate in combo1
The column PRODUCT I must to populate in combo2
For this I should make a select distinct
Attachment 143351
When user click in combo 1
Example 'SP' It should allow to display in combo 2 only the products APPLE and BANANA
But if the user to click in combo 1 in 'MG' It should allow to display in combo 2 only the products APPLE BANANA and PINAPPLE
But the user can first click combo 2, and choose for example PINAPPLE , then in combo 1 Only MG should appear
How can I to Implement this ?
Tia
Re: Synchronized two combobox
Fill your first combo.
When the selection changes in the first combo then query your data to get the proper records and fill the second combo.
Basically you need to rebuild the second combo each time the first one changes in order to have accurate items in the second one that match up to what was selected in the first.
For the first one you only want the unique values from field 1
The second one you would want only value from field 2 where field1 matches the selected item in the first combo
Or perhaps you want to do it the other way around, not sure but you can't really do it both ways at the same time