S
Sara
Hi,
I have a form in which I m trying to add the value of two bound textboxes
to be displayed on a third textbox, the sum on the third textbox is not
stored on the table.
I've tried to add this code:
Private Sub TxtQuantity_AfterUpdate()
Me.TxtTotal= Me.TxtQuantity + Me.TxtLabor
End Sub
Private Sub TxtLabor_AfterUpdate()
Me.TxtTotal = Me.TxtQuantity + Me.Quantity
End Sub
However, when I reopen the form and I used the record navigation button, the
value of the textbox Total for the first record is desplayed for all the
other records.
For example, the table has Quantity=5; Labor=9 for record 1 and the form
shows 45 in the texbox which is correct, however if record 2 has Quantity=6;
labor=3 the Total textbox keeps showing 45, and the same for all the other
records.
I've tried to put the above code in the On Dirty event and there is no
different.
How can I make the the TotalTxtbox to show the corrct value for each record ??
I appreciate your help!
I have a form in which I m trying to add the value of two bound textboxes
to be displayed on a third textbox, the sum on the third textbox is not
stored on the table.
I've tried to add this code:
Private Sub TxtQuantity_AfterUpdate()
Me.TxtTotal= Me.TxtQuantity + Me.TxtLabor
End Sub
Private Sub TxtLabor_AfterUpdate()
Me.TxtTotal = Me.TxtQuantity + Me.Quantity
End Sub
However, when I reopen the form and I used the record navigation button, the
value of the textbox Total for the first record is desplayed for all the
other records.
For example, the table has Quantity=5; Labor=9 for record 1 and the form
shows 45 in the texbox which is correct, however if record 2 has Quantity=6;
labor=3 the Total textbox keeps showing 45, and the same for all the other
records.
I've tried to put the above code in the On Dirty event and there is no
different.
How can I make the the TotalTxtbox to show the corrct value for each record ??
I appreciate your help!