473,394 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Use Subform calculated Field in Main Form

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
2 8269
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bill Strass | last post by:
Problem: Access main form/subform as front end to SQL Server backend. Add/edit via subforms work fine. Not so with main form. Set up a master-detail form-subform using two views linked from SQL...
2
by: TDIOwa | last post by:
I have a form (frmAppointment) with a subform on it (frmAppointmentsub1). I have placed a command button on the main form which calls the function below from the module. The purpose of this...
4
by: Apple | last post by:
Can I edit an calculated field in my form if needed. Thank you in advance for your help. Sincerely Apple
2
by: prakashwadhwani | last post by:
I have a (Main) form named : Stocks_Main and a Subform in that named: Stocks_Data The Subform is a continuous form There is a field in the subform called QTY_IN Now ... on the main form i.e....
3
by: wideasleep | last post by:
Hi everyone, I have a subform that is a continuous form. It will have mutiple records that connect to a single record in the main form. I have set this up but running tests show only one record...
0
by: Richnep | last post by:
Hi all,. I have a small issue I would like to resolve with VBA. I have a form which it's fields are bound to a table. Within that form is a subform which is a subtable. Tables relationship...
1
by: ssr61 | last post by:
hi can u help me how to open a sub form with in a main form without opening a new window..... my main form (frm_searchby_Name)consists of text field to enter the address and button when...
2
reginaldmerritt
by: reginaldmerritt | last post by:
Not sure if this is even possible, but i want to select a field in a sub form from a main form. I want to populate a field in the main form with a sub forms field value. eg. me.name =...
1
by: Bob Alston | last post by:
I have a system where many subforms are used. Often the size of the subform had to be larger than could be displayed without scrolling. I set the height of the subform to the typical height...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.