DBCombo box selection

I have a DBCombo box listing records from an access database. The field that is displayed in the combo box is not unique so many times an item will appear multiple times in the control. Each occurrence is for a unique record with different field values, they just have the same name. My problem is that when multiple items are listed and I select any of them the control always selects (.bookmark) the first occurrence. For example if records 19, 25 and 45 all have the description ABC, the control will display all 3 records, but no matter which one I select it always sets the .bookmark to record 19. Is there a way around this? Am I doing something wrong?
LVL 1
chaos_59Asked:
Who is Participating?
 
raygibbinsConnect With a Mentor Commented:
Ensure that the datasource for the DBCombo has the KeyField

Set the listfield property to be the field you want the user to see

Set the DataBound  and DataField properties of DBCombo to be this Field

0
 
chaos_59Author Commented:
Edited text of question
0
 
raygibbinsCommented:
You should give each record a unique ID, and use this ID to select the record.
0
 
chaos_59Author Commented:
This isn't an option. The database is already in use. The only unique part of the record is the record key, a numeric field that is meaningless to the user.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.