Delete a record after using the data wizard and binding
I don't usually use the Datawizard to bind my data to controls on a form but I did so recently. Now I am having a little trouble figuring out how to remove records from the table. The code below will remove the record from the Dataset but not the table. What am I missing to get the results I need?
Code:
Private Sub btnDelete_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnDelete.Click
Me.BindingContext(DsPTrack1.Tables("Ptrack")).RemoveAt( _
Me.BindingContext(DsPTrack1.Tables("Ptrack")).Position)
RecordStats()
End Sub