Hey Shady,
Your ListBox should be data bound to your table, right Have it displaying one thing, then using the primary key for your Value Number (eg, Name for Display member, EntryID for Value member).
These lines of code might work (still kinda using the Name example from above). I'm still new to this too, so it will no doubt need a bit more work, plus it will need to be personalized for your database, but I hope it points you in the right direction.
Dim DeleteRow As DatabaseNameDataSet.TableNameRow
DeleteRow= Me.DatabaseNameDataSet.TableName.RemoveTableNameRow
Dim Name as Integer
Name = ListBox.ValueMember
' Any more random code here.
Me .DatabaseNameDataSet.TableName.Rows.Remove(Name)
Me .TableNameTableAdapter1.Update(DatabaseNameDataSet.TableName)
Good luck
Bort
|