分两列显示的下拉控件
就是数据库中有一列是学号,一列是姓名,怎么显示到一个下拉框里?
[解决办法]
Option Explicit
Private Sub Combo1_Click()
MsgBox "选中的编号是:" & Combo1.ItemData(Combo1.ListIndex)
End Sub
Private Sub Form_Load()
Combo1.AddItem "1." & "张三"
Combo1.ItemData(Combo1.NewIndex) = 1
Combo1.AddItem "2." & "李四"
Combo1.ItemData(Combo1.NewIndex) = 2
End Sub
[解决办法]