Private Sub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click '---confirm delete '*****To make this work, set the DeleteItem property of the BindingNavigator to none***** Try If (MessageBox.Show("Are you sure you want to delete this item?", _ "Please Confirm delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, _ MessageBoxDefaultButton.Button2)) = Windows.Forms.DialogResult.Yes Then If InventoryBindingSource.Count > 0 Then 'make sure there are records in the dataset InventoryBindingSource.RemoveCurrent() 'removes the selected item in the list of records UpdateDB() 'save changes and refresh the grid End If End If Catch ex As Exception MessageBox.Show("An error occurred while deleting this record. " & ex.Message, "Mr. Grid Error", _ MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub