Link to home
Start Free TrialLog in
Avatar of hitsdoshi1
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.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of hitsdoshi1
hitsdoshi1

ASKER

Thank you.