By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,829 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,829 IT Pros & Developers. It's quick & easy.

Use Subform calculated Field in Main Form

P: n/a
I've been having trouble with this for a long time. I have a form
that has many subforms. In the subforms I have unbound text boxes in
the footer that sum a field. I want to Display this sum on the main
form for each subform and then add them all together. In a book I
have it gives the following example:
=(Object type![Form Name]![Subform name].Form![Subform field name])

I created an unbound text box on my main form and filled in the
information in the example above and get a value of #Name?

What am I doing wrong? I've checked all of the form and field names
more than once for errors. Is there another way of doing this? I'm
in great need of a solution to this problem.

Regards,
Chris
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
From the main form, you can use:
=[Sub1].[Form]![Text1]
That assumes the subform control is named "Sub1", and the text box in the
subform control is named "Text1".

If that still does not work, open the main form in design view. Right-click
the edge of the subform control, and choose Properties. Check the Name
property of the subform control: sometimes the control may have a Name that
is different to the form you load into the control (its SourceObject).

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

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"chris vettese" <ch**********@yahoo.com> wrote in message
news:40**************************@posting.google.c om...
I've been having trouble with this for a long time. I have a form
that has many subforms. In the subforms I have unbound text boxes in
the footer that sum a field. I want to Display this sum on the main
form for each subform and then add them all together. In a book I
have it gives the following example:
=(Object type![Form Name]![Subform name].Form![Subform field name])

I created an unbound text box on my main form and filled in the
information in the example above and get a value of #Name?

What am I doing wrong? I've checked all of the form and field names
more than once for errors. Is there another way of doing this? I'm
in great need of a solution to this problem.

Regards,
Chris

Nov 12 '05 #2

P: n/a
THANK YOU VERY MUCH!! The sub form name was different that what I
named it. Such a simple solution to a problem that has caused me so
much trouble.

Regards,
Chris

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<40**********************@freenews.iinet.net. au>...
From the main form, you can use:
=[Sub1].[Form]![Text1]
That assumes the subform control is named "Sub1", and the text box in the
subform control is named "Text1".

If that still does not work, open the main form in design view. Right-click
the edge of the subform control, and choose Properties. Check the Name
property of the subform control: sometimes the control may have a Name that
is different to the form you load into the control (its SourceObject).

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

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"chris vettese" <ch**********@yahoo.com> wrote in message
news:40**************************@posting.google.c om...
I've been having trouble with this for a long time. I have a form
that has many subforms. In the subforms I have unbound text boxes in
the footer that sum a field. I want to Display this sum on the main
form for each subform and then add them all together. In a book I
have it gives the following example:
=(Object type![Form Name]![Subform name].Form![Subform field name])

I created an unbound text box on my main form and filled in the
information in the example above and get a value of #Name?

What am I doing wrong? I've checked all of the form and field names
more than once for errors. Is there another way of doing this? I'm
in great need of a solution to this problem.

Regards,
Chris

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.