I have a two-column combo box on an Access form representing a key-to-code mapping. The first column of the combo box is the 'bound column' (ie, the column used when MyComboBox.Value
is called).
I need to dynamically set the Value
of my combo box based on a value found in the second column. For eg, if my combo box source is:
Value | Code
===============
A1 | ABCD
A2 | EFGH
A3 | IJKL
I can set the value of the combo box simply with ComboBox.Value = "A2"
, but how would I do the same using the second column? ComboBox.Value = "EFGH"
obviously isn't valid. Essentially looking for logic along the lines of ComboBox.Value = ComboBox.ValueWhereSecondColumnEquals("EFGH")