Omid Golban Posted June 12, 2003 Posted June 12, 2003 I have setup my dataset & have finished binding a combo box to its values: .... cboTest.DataSource = dsXref.Tables(0) ' Select CONO, NAME_1 from COMPANY cboTest.DisplayMember = "NAME_1" cboTest.ValueMember = "CONO" .... Now, when I drop down the menu of combo box, I get a list of NAME_1 columns as expected. After user chooses one of the entries, that entry's NAME_1's data is copied into combo box's text property. Instead I want the CONO (the value member) to be copied into the text property. How can I do this? Additionally, after using an entry from the dropdown menu of combo box (SelectedIndexChanged), I expected the Validating event to fire, but it doesn't. How can I find out the firing sequence of events? Thank you, Omid Quote
Moderators Robby Posted June 12, 2003 Moderators Posted June 12, 2003 try... cboTest.SelectedItem.Value Quote Visit...Bassic Software
Omid Golban Posted June 12, 2003 Author Posted June 12, 2003 In which event should I do this? I've tried Validating, SelectedIndexChanged, SelectedValueChanged, Validated, & SelectionChangeCommitted. In each instance, I did set the text value of the control & verified it by displaying it using MsgBox. But when the control goes back to the form, I end up with the value from NAME_1 column back in the control's Text. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.