pachjo Posted December 31, 2006 Posted December 31, 2006 I have set a combobox as follows: 'set the bindings for the transaction description combobox Me.cboTransDescription.DataSource = glb_dbTransactionDescBinding Me.cboTransDescription.DisplayMember = "tran_description" Me.cboTransDescription.ValueMember = "tran_id" This successfully populates the combobox and also allows me to add items which appear in the combobox. I want to be able to delete the selected item in the combobox and found on this site that one should use a bindingsource to do so which I did and it does get removed from the combobox but I have found that neither adding or deleting affects the actual database. Here is how I setup the bindingsource: glb_taTransactionDesc.Fill(glb_dtTransactionDesc) glb_dbTransactionDescBinding.DataSource = glb_dtTransactionDesc and here is how I delete a record from the combobox but does not affect the database: glb_dbTransactionDescBinding.Remove(glb_dbTransactionDescBinding.Current) glb_taTransactionDesc.Update(glb_dtTransactionDesc) Have I lost the plot and missed something important? Thanks 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.