How to set the itemdata in a combox from key value
How would i set the itemdata from getting just the ID/key of a row, if i didnt k开发者_运维问答now what order it is in on the list
For example I have a combo box showing the following:
cmbPeople:
ID Name
2 Rod
4 Jane
6 Freddy
eg. I know I want Jane to be the focus of the combo box, and i have the ID but i dont know that its the second item in the list ( Me.cmbPeople.ItemData(1) )
How would I go about doing this??
Thanks in advance for any help
If ID is the bound column, you can simply say:
Me.cmbPeople = 2
精彩评论