How to add key/value pair to Combo Box in VBA.

kosala

New member
Local time
Today, 12:09
Joined
Apr 5, 2007
Messages
1
How to add key/value pair to Combo Box in VBA.

I have two Combo Boxes. First Combo Box will fill values into the Second Combo box. The key/ID of the selected value of the second Combo Box must bind to a field of Table.

I coudnt give the key/value pair using the ComboBox.Add(string,index) command. I need to do this with the ValueList property not with the Table/Query property.

Using the Table/Query property i could do this but it shows the Key/ID in the second ComboBox not the Value/Text in the Form Load and gives some unusual behaviours in the combobox when i tried to navigate through the records in the form as well.
 
Search for topics on Cascading Combos. They will talk about how to use one combo to control the contents of a second. The methods rely on tables. They do not update the RowSource of the child combo.
 

Users who are viewing this thread

Back
Top Bottom