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.
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.