hitsdoshi1
asked on
Acess VBA Combo box
Following is the scenario I am dealing with...
I have the combo box with two columns
Name Age
David 29
David 32
Peter 24
Peter 25
Peter 26
Peter 29
Maria 22
Maria 29
I selected Peter 26, and after selecting when I go back to drop down combo, it is always on Peter 24, how do I code it to have it keep the selection ie Peter 26
Thanks.
I have the combo box with two columns
Name Age
David 29
David 32
Peter 24
Peter 25
Peter 26
Peter 29
Maria 22
Maria 29
I selected Peter 26, and after selecting when I go back to drop down combo, it is always on Peter 24, how do I code it to have it keep the selection ie Peter 26
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'd suggest adding an ID field so each row is unique and then bind your combo box to that ID field. It is quite possible to have two Davids who are the same age. So using either the name or NameAge as your key is not at all reliable.
ASKER
Thank you.