retriving a calculation from a sub-from

S

SharonInGa

My main form is called "Master". My sub-form is called "Record Detail". The
link field is PO#. . =sum([Weight]) works on the subform, however, how
would I get the calculation from the subform to appear on the Master form.
 
Z

zaqyu

put a control in your main form and have its control referred to the control
in your subform that computes the weight.

sample: Forms!Master![Record Detail].form![Name of your control]


ZAQYU
 
O

Ofer

Create a Sum field in the sub form as you indicated.
Create a Field in the main form and in the control source of that field write

=[Record Detail].Form![Sum field in the subform]

if the [Record Detail] is also the name of the sub form control within the
main form
 
A

Allen Browne

If the sum is showing in a text box named Text0 in the subform, use this:
=[NameOfYourSubformControlHere].Form!Text0

For an explanation, see:
Referring to Controls on a Subform
at:
http://allenbrowne.com/casu-04.html

For an example, open the Northwind sample database that comes with Access,
and see how the Orders form picks up the total from the subform.
 
Top