开发者

How to set the itemdata in a combox from key value

开发者 https://www.devze.com 2022-12-25 04:16 出处:网络
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

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
0

精彩评论

暂无评论...
验证码 换一张
取 消