There is a combobox and a delete button in my form. when i click the delete button i want to get a confirmation message from the item values which are more than 10,000.
but there is an error.
here is my code for delete button:
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
If ds.Tables("ItemList").Rows(ComboBox1.SelectedIndex).Item(1) > 10000 Then
MessageBox.Show("Do you really want to Delete this Record?", "Confirm Deletion", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
If DialogResult.No Then
Dim cb As New OleDb.OleDbCommandBuilder(da)
according to that when the confirmation msg comes if i click no button the proper msg comes. but if i click the yes button the item should delete from the combobox. but the item doesn't delete when i clicked yes button
can somebody find me the issue?
Put a debug point on the first line of the method and then once the code executes, debug from this point.
You should get the error message details as well as the location of the error.
This will help you identify what the error could be.
If you cannot identify the cause of the error, modify and post the error message in your question above so that someone can try and help you.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)