Hi,

I have a customer table that contains two fields customer ID, customer name, what i want to do is having a dropdown box for user to pick the customer name, but when save the data back to the database

I want to save the customer id value instead of the customer name.

Here is the code how I populate the dropdown from database when the form is loaded

p=0
Do Until customer_table.EOF()
Cbocompany.AddItem rs![customername], p
p = p + 1
rs.MoveNext
Loop


Could anyone help me how to do that in dropdown box.

Thanks