skea
Registered User.
- Local time
- Today, 09:34
- Joined
- Dec 21, 2004
- Messages
- 341
Hey Folks am in a Fix and i need help NOW.
I have two tables, table1 (DistID,CompanyID,District)
table2(DistID,District)
table one is a rowsource to a list box which is grouped in terms of District.
In the After Update Event Of The Listbox, i run the query to populate a combo box(MyCB) with one value.
Me.MyCB.RowSource = "SELECT DistID FROM table2 WHERE(District= '" & Me.MyListBox.Column(2) & "')"
Problem: I want to use this value(DistID) in MyCB on another form without manually going to the Combo Box (which i dont want to be visible) and selecting. How can i reference it.Is there an auto selection in VBA
Since a textbox cannot be given a rowsource, the MyCB was the best option.
I have two tables, table1 (DistID,CompanyID,District)
table2(DistID,District)
table one is a rowsource to a list box which is grouped in terms of District.
In the After Update Event Of The Listbox, i run the query to populate a combo box(MyCB) with one value.
Me.MyCB.RowSource = "SELECT DistID FROM table2 WHERE(District= '" & Me.MyListBox.Column(2) & "')"
Problem: I want to use this value(DistID) in MyCB on another form without manually going to the Combo Box (which i dont want to be visible) and selecting. How can i reference it.Is there an auto selection in VBA
Since a textbox cannot be given a rowsource, the MyCB was the best option.
Last edited: