G
Guest
Hello, I am having problem calling After Update between form/subform.
Here is the information:
I have a [Enter Invoice] form with a [Products] subform (spreadsheet).
[Enter Invoice] includes textboxes: SubTotal, Discount, TaxRate, Tax, Total
....etc
its subform [Products] includes: SubTotal, Price ...etc
in [Products] subform, Price(s) are summed in SubTotal, then copied to
SubTotal in [Enter Invoice]. Then Tax and then Total are calculated (but tax
can also change by keyboard!).
So, order of update is: Price->SubTotal->SubTotal->Tax->Total (4 steps)
and want each control to call the next control's After Update Event in its
own After Update Event Procedure (or else only keyboard entry causes
AfterUpdate Event to fire [only on step forward]).
Now the problem is in step 2:
here is how I wrote [Products].SubTotal After Update procedure:
Private Sub SubTotal_AfterUpdate()
Me.Parent.SubTotal.Requery
'Forms![Enter Invoice]!SubTotal.[After Update]
'Forms![Enter Invoice]![SubTotal].AfterUpdate
'Me.Parent.SubTotal_AfterUpdate
End Sub
I am trying to set the value of the next control (on main form) and then
call its After Update procedure. But none of the 3 statements I have
commented out have worked. They give me runtime error 438 "object does not
support this property or method"
What am I doing wrong in SubTotal_AfterUpdate() ?
Thanks in advance.
Here is the information:
I have a [Enter Invoice] form with a [Products] subform (spreadsheet).
[Enter Invoice] includes textboxes: SubTotal, Discount, TaxRate, Tax, Total
....etc
its subform [Products] includes: SubTotal, Price ...etc
in [Products] subform, Price(s) are summed in SubTotal, then copied to
SubTotal in [Enter Invoice]. Then Tax and then Total are calculated (but tax
can also change by keyboard!).
So, order of update is: Price->SubTotal->SubTotal->Tax->Total (4 steps)
and want each control to call the next control's After Update Event in its
own After Update Event Procedure (or else only keyboard entry causes
AfterUpdate Event to fire [only on step forward]).
Now the problem is in step 2:
here is how I wrote [Products].SubTotal After Update procedure:
Private Sub SubTotal_AfterUpdate()
Me.Parent.SubTotal.Requery
'Forms![Enter Invoice]!SubTotal.[After Update]
'Forms![Enter Invoice]![SubTotal].AfterUpdate
'Me.Parent.SubTotal_AfterUpdate
End Sub
I am trying to set the value of the next control (on main form) and then
call its After Update procedure. But none of the 3 statements I have
commented out have worked. They give me runtime error 438 "object does not
support this property or method"
What am I doing wrong in SubTotal_AfterUpdate() ?
Thanks in advance.