Combobox Question

  • Thread starter Thread starter Gary Paris
  • Start date Start date
G

Gary Paris

I have a combobox on my windows form. It is populated from the "staff"
table which has a StaffID and StaffName.

The code is:

cmbStaff.DataSource = objDataset.Tables("Staff")
cmbStaff.DisplayMember = "StaffName"
cmbStaff.ValueMember = "StaffID"

When I query my contact database how can I make sure that the StaffID value
points to the correct record in the combobox?

I checked the properties of the combobox and can't find the right way to
associate StaffID to StaffName.

HELP PLEASE.

Thanks,

Gary
 

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

Back
Top