Dropdown list items and item IDs

I

IgorM

Hi

I have a query that retrieves some data from Access database (I get ID,
ItemName).
I then want to use the data (ItemName) as a source for a drop down list.
For this I use:
Do While Not rsData.EOF
' Load the dropdown with the recordset values.
ddCustomers.AddItem rsData.Fields(1).Value
rsData.MoveNext
Loop

The only problem is when I want to use an item from the list to save it back
to the database. Because items in the list box are not distinct (unique) I
don't know how to identify them.
Can I add items to list boxes with they ID's? Or do I have to relay on the
item position in a list box.

I would also be thankful if someone could please recommend some good site on
this issue, ie recordset manipulation, binding recordsets with list boxes,
dropdown lists, etc.

Kind regards
IgorM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top