The idea being that when a new asset is displayed, the program would
recalculate the values of some labels.
For example, when Previous or Next is clicked.
I set bLoaded=True when the form loads, as otherwise the code would once for
each asset in the database when the form was loading -
Me.AssetsTableAdapter.FillByAsset(Me.AssetsDataSet .Assets, stAssetCode)
Another problem is that when the Save is done, the RefreshItems runs twice
for each of these lines
Me.AssetsBindingSource.EndEdit()
Me.AssetsTableAdapter.Update(Me.AssetsDataSet.Asse ts)
And heres my code:
Private Sub AssetsBindingNavigator_RefreshItems(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AssetsBindingNavigator.RefreshItems
If bLoaded Then
TidyNumbers()
bNewSchedule = False
DoCalcFields()
End If
End Sub
Should I be putting this code somewhere else? How often does
BindingNavigator_RefreshItems run?
Thanks
Vayse