473,545 Members | 4,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8299
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**********@y ahoo.com> wrote in message
news:40******** *************** ***@posting.goo gle.com...
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*********@Se eSig.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**********@y ahoo.com> wrote in message
news:40******** *************** ***@posting.goo gle.com...
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
2187
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 Server. The subform allows inserts an updates, while the main form will not. The only solution I can think of is to recreate using tables imported...
2
3819
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 function is to make fields beginning with YY invisble OnClick of the command button on the main form. It works for the fields on the main form but not...
4
5362
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
2379
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. Stocks_Main I have set a text box to display a total of the QTY_IN control (which is on the subform). I am using the foll code as the control...
3
1989
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 for each record in the main form. In the subform table it does show all the records but not in the form itself. I tried this with a datasheet view but...
0
1926
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 is a one to many from the main table to the sub table.
1
6093
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 i click the button a new subform window is opening...
2
1818
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 = subform.name Not sure of the correct syntax to use. All ideas and suggestions welcom Thanks.
1
5574
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 appropriate for the typical screen resolution they were using. Now some users have decided to use higher screen resolutions, up to 1280/1024. When they...
0
7396
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7751
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4943
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3440
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1874
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
700
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.