The following line of code dones what I need it to do:
but not exactly the way I'd like it to.
This line is in an edit form called from another form. So when I populate the fields in the form for the user to change, the dropdownlists are populated too.
Then what this line does is not what you'd think it does: select the item in the list. It just adds that item from the database to the top of the list.
That's not really so bad, since my major concern is that the user can only choose a value from the list. But it's not very elegant since that value is now twice in the list -- at the top and somewhere in the middle of the list.
Is there a way to select a given item from the list instead of adding it to the top?
dpdoug
Code:
Me.cboCustomer.SelectedItem().Text = rs.Fields.Item("CustomerID").Value()
but not exactly the way I'd like it to.
This line is in an edit form called from another form. So when I populate the fields in the form for the user to change, the dropdownlists are populated too.
Then what this line does is not what you'd think it does: select the item in the list. It just adds that item from the database to the top of the list.
That's not really so bad, since my major concern is that the user can only choose a value from the list. But it's not very elegant since that value is now twice in the list -- at the top and somewhere in the middle of the list.
Is there a way to select a given item from the list instead of adding it to the top?
dpdoug