I have a main form with several with four subforms. On the main form I have a bound text box [ShiftTotal] I have on each subform a unbound text box that sums a field [ExtTaxIn]. I am working with just one subform till I can get it to work correctly. The code I am using on the after update event is as follows.
code
-----------------------------------------------------------------------
Private Sub TxtSoldQty_AfterUpdate()
On Error GoTo HandleError
Me.ExtTaxIn = (Me.TxtSoldQty * Me.TaxIn)
Me.ExtPrice = (Me.TxtSoldQty * Me.Price)
Me.InvSold = (Me.TxtSoldQty * Me.UnitOfSale)
Forms!frmShiftMain!TxtShiftTotal = Forms!frmShiftMain!TxtRunningTotal
Me.txtExtTaxIn.Requery
Exit Sub
HandleError:
GeneralErrorHandler Err.Number, Err.Description, "modBusinessLogic", _
"TxtSoldQty_AfterUpdate"
Resume Next
Resume
Exit Sub
End Sub
This sort of works but the [ShiftTotal] on the main form is always one table row behind. I think this is because of the order the event fires but can't seem to work my way around it so open to solution if possible or any idea's
Thanks Bob :banghead:
code
-----------------------------------------------------------------------
Private Sub TxtSoldQty_AfterUpdate()
On Error GoTo HandleError
Me.ExtTaxIn = (Me.TxtSoldQty * Me.TaxIn)
Me.ExtPrice = (Me.TxtSoldQty * Me.Price)
Me.InvSold = (Me.TxtSoldQty * Me.UnitOfSale)
Forms!frmShiftMain!TxtShiftTotal = Forms!frmShiftMain!TxtRunningTotal
Me.txtExtTaxIn.Requery
Exit Sub
HandleError:
GeneralErrorHandler Err.Number, Err.Description, "modBusinessLogic", _
"TxtSoldQty_AfterUpdate"
Resume Next
Resume
Exit Sub
End Sub
This sort of works but the [ShiftTotal] on the main form is always one table row behind. I think this is because of the order the event fires but can't seem to work my way around it so open to solution if possible or any idea's
Thanks Bob :banghead: