P
Philip
Hello All
Have a simple problem with a subform.
I have a form called Order, and a subform called OrderItems_Subform. The
Subform is a continous form.
Simple enough.
when items (records) are added to the Subform, a field in the footer of the
subform is recalculated with me.recalc
The field in the footer part of the subform is
TotalPrice.Recordsource=Sum([Price]).
This works great.
However, I need to transfer that value to the Orders form. I need to do
this as soon as the recalc is done. (dynamic update for the user).
In the subform I have the following code on Price_AfterUpdate()
Me.Recalc
Forms!Order!TotalPrice = Me!TotalPrice
Problem is, the recalc updates the Me!TotalPrice in the subform no problem,
but the next line does not update the TotalPrice field in the Order form.
Why?
Strange thing is, if I put a break point in at me.recalc, then step through,
it updated the TotalPrice in the Order form OK.
???
What have I got to do between these two lines to make it work? The stepping
through is allowing enough time (or something) to happen, but just running
it isnt.
Help!
Thanks... Philip Middleton
Have a simple problem with a subform.
I have a form called Order, and a subform called OrderItems_Subform. The
Subform is a continous form.
Simple enough.
when items (records) are added to the Subform, a field in the footer of the
subform is recalculated with me.recalc
The field in the footer part of the subform is
TotalPrice.Recordsource=Sum([Price]).
This works great.
However, I need to transfer that value to the Orders form. I need to do
this as soon as the recalc is done. (dynamic update for the user).
In the subform I have the following code on Price_AfterUpdate()
Me.Recalc
Forms!Order!TotalPrice = Me!TotalPrice
Problem is, the recalc updates the Me!TotalPrice in the subform no problem,
but the next line does not update the TotalPrice field in the Order form.
Why?
Strange thing is, if I put a break point in at me.recalc, then step through,
it updated the TotalPrice in the Order form OK.
???
What have I got to do between these two lines to make it work? The stepping
through is allowing enough time (or something) to happen, but just running
it isnt.
Help!
Thanks... Philip Middleton