Select item from a ComboBox
Assuming the combo's first column, SubTopicID
, is also the combo's "bound column" property, it is used as the column's .Value
property. That means you only need to assign a value to .Value
in order to select the matching combo row.
Me.cmbSubTopic.Value = rsST.Fields("SubTopicID").Value
That approach is simple, but I'm uncertain whether it is the appropriate solution for your situation. We don't know anything about your rsST
recordset --- I presumed the SubTopicID
field in the recordset's current row is the value you want selected in the combo. If I misunderstood that point, we need to figure out something different.
If the combo is bound to a field in the form's record source, this suggestion would also change the stored value. If you don't want that, "unbind" the combo --- in other words, make its Control Source property blank.