>I have developed a purchase order form which has a subform that is the
>itemized list of of purchases. On this subform I have a footer with an
[quoted text clipped - 4 lines]
>I would like to transfer this total to the parent form txtSubtotal text box
>for further calculations.
The parent form can use a text box expression such as:
=subform.Form.Total
The subform record must be saved before the total can be
updated. Going to any other record is one action theat will
force a record to be saved.

Signature
Marsh
MVP [MS Access]
Kevin - 16 Mar 2007 09:40 GMT
I have tried this expression with no results.
One way I solved the problem was to enter "Parent!Total = Me!Subtotal" in
the Lost Focus event of the Subtotal text box. Is there a way in code to
change the focus of that text box so that event is performed automaticly
instead of having to put the curser in that field and then remove it to
update the total field
Kevin
> >I have developed a purchase order form which has a subform that is the
> >itemized list of of purchases. On this subform I have a footer with an
[quoted text clipped - 11 lines]
> updated. Going to any other record is one action theat will
> force a record to be saved.
Marshall Barton - 16 Mar 2007 21:59 GMT
In my experience, that approach doesn't always work (it's a
timing thing).
If you force the new/modified record to be saved, everything
is supposed to update automatically. I don't have any idea
where/when you would want to save the record (maybe a
button???), but the code is simply:
If Me.Dirty Then Me.Dirty = False

Signature
Marsh
MVP [MS Access]
>I have tried this expression with no results.
>
[quoted text clipped - 19 lines]
>> updated. Going to any other record is one action theat will
>> force a record to be saved.
fuzzyEuclid - 19 Mar 2007 16:07 GMT
In the subform control's AFTER UPDATE event, put use the "Refresh" command - this will force the subform to update it's recordset/table. Right underneath the Refresh command you can put the code to update the parent form's box.
Hope I understood your problem, and hope that I actually helped!
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com