this is how the combo is loaded
Do While Not DBRec.EOF
cmbTeacher.AddItem DBRec!Teacher_Name
cmbTeacher.ItemData(cmbTeacher.NewIndex) = DBRec!TeacherID
DBRec.MoveNext
Loop
lets say i am adding
Smith, 45
Jones, 46
later on i need to set the value of the combo box based on the Index that I have.
So if I had the number 45 how would i set the combos value to Smith?
cmbTeacher.ListIndex = 45 doesnt work
thanks
Do While Not DBRec.EOF
cmbTeacher.AddItem DBRec!Teacher_Name
cmbTeacher.ItemData(cmbTeacher.NewIndex) = DBRec!TeacherID
DBRec.MoveNext
Loop
lets say i am adding
Smith, 45
Jones, 46
later on i need to set the value of the combo box based on the Index that I have.
So if I had the number 45 how would i set the combos value to Smith?
cmbTeacher.ListIndex = 45 doesnt work
thanks