I have a Windows Forms app in VB.Net 2002. The form has a tabcontrol with 2 tabpages. Textboxes on both pages are bound to same dataset. User updates textboxes on Page 2, then selects Page 1 and clicks Save button. Usually this works fine, but sometimes Page 2 data is not saved. Here is the code in Save button:
Me.BindingContext(ViewSummons).EndCurrentEdit()
If Me.DsSummons1.HasChanges Then
ViewSummons.Table.GetChanges()
DatSummons.Update(DsSummons1, "Summons")
DsSummons1.AcceptChanges()
End If
Me.BindingContext(ViewSummons).EndCurrentEdit()
If Me.DsSummons1.HasChanges Then
ViewSummons.Table.GetChanges()
DatSummons.Update(DsSummons1, "Summons")
DsSummons1.AcceptChanges()
End If