473,761 Members | 6,993 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculated total on subform will not display on main form

I have a subform named "sbfrmParts " with a list of parts along with the
quantity and price. I have used a text box in the subform's footer and set
the control source to "=Sum([NET PRICE]*[Quantity])". I set the format to
display currency. This text box is called "SubformTot al", and is visible
property is set to "No". On the main form I have made another text box and
set its control source to "=[sbfrmParts].Form!SubformTo tal".

When I enter some parts everything works perfectly until I look at the text
box on the main form. It only displays "#Error".

What is wrong?

Any suggestions?

Shannan Casteel
--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05
30 8911
I probably misspoke on the brackets, although on mine they aren't there.
There is one control you've left off, what is the name of the subform
control on the main form? This control holds the subform and its name may or
may not be the same as the subform itself. This control is where you set the
Parent/Child Link fields.

--
Wayne Morgan
MS Access MVP
"Shannan Casteel via AccessMonster.c om" <fo***@AccessMo nster.com> wrote in
message news:53******** ***@AccessMonst er.com...
Wayne,

Here is how it is setup. I went and double checked just to be sure.

Subform Name: sbfrmParts
Main Form Name: frmClaim
Subform text box name: SubformTotal
Main Form text box name: MainFormTotal
Main Form text box control source: = [sbfrmParts].Form!SubformTo tal

I could not get those last set of brackets to go away. The text box on
the
main form still displays "#Error".

What's wrong?

Nov 13 '05 #11
Shannan Casteel via AccessMonster.c om wrote:
Subform Name: sbfrmParts
Main Form Name: frmClaim
Subform text box name: SubformTotal
Main Form text box name: MainFormTotal
Main Form text box control source: = [sbfrmParts].Form!SubformTo tal

I could not get those last set of brackets to go away. The text box on the
main form still displays "#Error".


Probably something you've checked already, but is SubformTotal a bound
control? If so, what is it's control source? If it is also
SubformTotal (from a query or the SQL behind the subform) this will be
your error source.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #12
Tim Marshall wrote:
Shannan Casteel via AccessMonster.c om wrote:
Subform Name: sbfrmParts
Main Form Name: frmClaim
Subform text box name: SubformTotal
Main Form text box name: MainFormTotal
Main Form text box control source: = [sbfrmParts].Form!SubformTo tal

I could not get those last set of brackets to go away. The text box
on the
main form still displays "#Error".

Probably something you've checked already, but is SubformTotal a bound
control? If so, what is it's control source? If it is also
SubformTotal (from a query or the SQL behind the subform) this will be
your error source.


I just looked at your original post.

Following the theme of my quoted suggestion, above, have you tried
making the SubformTotal text box in the subform visible and checked to
see if you are also getting an error there? If you are, confusion in
naming will be the likely culprit. Check to see if the controlsource of
SubformTotal, which is =Sum([NET PRICE]*[Quantity]) is getting confused.
In other words, check the text boxes that have NET PRICE and Quantity
as names or controlsources and see if name=controlsou rce. If so, you'll
need to rename the controls.

Another thing - you mention that you have this SubformTotal text box in
the "subform's footer". Are you sure it's not in the subform's page
footer? A location there might also throw an error.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #13
The name of the control that holds the subform is also sbfrmParts.

Shannan

Wayne Morgan wrote:
I probably misspoke on the brackets, although on mine they aren't there.
There is one control you've left off, what is the name of the subform
control on the main form? This control holds the subform and its name may or
may not be the same as the subform itself. This control is where you set the
Parent/Child Link fields.
Wayne,

[quoted text clipped - 11 lines]

What's wrong?

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05 #14
The control source for SubformTotal, which is the text box on the subform's
footer, is "=Sum([NET PRICE]*[Quantity]). This text box works fine. It
returns the correct value.

Shannan

Tim Marshall wrote:
Subform Name: sbfrmParts
Main Form Name: frmClaim

[quoted text clipped - 4 lines]
I could not get those last set of brackets to go away. The text box on the
main form still displays "#Error".


Probably something you've checked already, but is SubformTotal a bound
control? If so, what is it's control source? If it is also
SubformTotal (from a query or the SQL behind the subform) this will be
your error source.

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05 #15
May be a dumb question, but what's the difference between the subform footer
and the subform page footer?

Shannan

Tim Marshall wrote:
Subform Name: sbfrmParts
Main Form Name: frmClaim

[quoted text clipped - 10 lines]
SubformTotal (from a query or the SQL behind the subform) this will be
your error source.


I just looked at your original post.

Following the theme of my quoted suggestion, above, have you tried
making the SubformTotal text box in the subform visible and checked to
see if you are also getting an error there? If you are, confusion in
naming will be the likely culprit. Check to see if the controlsource of
SubformTotal , which is =Sum([NET PRICE]*[Quantity]) is getting confused.
In other words, check the text boxes that have NET PRICE and Quantity
as names or controlsources and see if name=controlsou rce. If so, you'll
need to rename the controls.

Another thing - you mention that you have this SubformTotal text box in
the "subform's footer". Are you sure it's not in the subform's page
footer? A location there might also throw an error.

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05 #16
Shannan Casteel via AccessMonster.c om wrote:
The name of the control that holds the subform is also sbfrmParts.


That could be your problem, Access is probably confused with two names
the same.

Try renaming the subform something like subParts, then reassign the
problem text box this controlsource:

subParts.form.S ubformTotal

Hopefully that will work...
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #17
Tim,

I checked the [NET PRICE] and [Quantity] controls and name did equal control
source, but I changed the names, which automatically updated my formula, and
it had no effect.

Shannan

Tim Marshall wrote:
Subform Name: sbfrmParts
Main Form Name: frmClaim

[quoted text clipped - 10 lines]
SubformTotal (from a query or the SQL behind the subform) this will be
your error source.


I just looked at your original post.

Following the theme of my quoted suggestion, above, have you tried
making the SubformTotal text box in the subform visible and checked to
see if you are also getting an error there? If you are, confusion in
naming will be the likely culprit. Check to see if the controlsource of
SubformTotal , which is =Sum([NET PRICE]*[Quantity]) is getting confused.
In other words, check the text boxes that have NET PRICE and Quantity
as names or controlsources and see if name=controlsou rce. If so, you'll
need to rename the controls.

Another thing - you mention that you have this SubformTotal text box in
the "subform's footer". Are you sure it's not in the subform's page
footer? A location there might also throw an error.

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05 #18
Nevermind I know what the page footer is, and no the text box is on the form
footer.

Shannan

Shannan Casteel wrote:
May be a dumb question, but what's the difference between the subform footer
and the subform page footer?

Shannan
Subform Name: sbfrmParts
Main Form Name: frmClaim

[quoted text clipped - 16 lines]
the "subform's footer". Are you sure it's not in the subform's page
footer? A location there might also throw an error.

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05 #19
Tim,

Now I get an error that reads "#Name".

Shannan

Tim Marshall wrote:
The name of the control that holds the subform is also sbfrmParts.


That could be your problem, Access is probably confused with two names
the same.

Try renaming the subform something like subParts, then reassign the
problem text box this controlsource:

subParts.form. SubformTotal

Hopefully that will work...

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3832
by: Allen Browne | last post by:
Subform is based on a single-table query that contains a calculated field: Amount: Round(CCur(Nz(*,0)),2) Continuous subform displays this field in a text box named Amount. As user enters new rows into subform, all rows show #Error in this box. This only happens until they close the form, or move the main form to a different record. Worse, it only happens on the client's machine in the MDE. The identical MDB file shows the calculation...
2
8313
by: chris vettese | last post by:
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!) I created an unbound text box on my main form and filled in the information in the example above and get a...
0
1953
by: Ellen Manning | last post by:
I've got an A2K form with a subform based on a query. This query has a checkbox and an amount field and returns records if checkbox is checked. I Dsum the amount field and display on the main form. If the user unchecks the box, I want the corresponding amount subtracted from the total. If they recheck the box, the amount is to be added. I want all records to appear on the subform even after unchecking them. This works fine...except......
25
10263
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
1
2971
by: tconway | last post by:
I have an Access program that displays Customer data into a form and OrderID data into a subform. The totals in the Subform are based on calculated fields, i.e. the Total Amount field Calculates the following: =* The Subform Order fields are pulled from a Query along with each calculated Total. They are displyed in a DataSheet View. This works fine on my developement environment which includes a server set up just as our client has. ...
5
4982
by: Mark | last post by:
Hi all, I'm completely new to access and am trying to create a simple form/subform. The main form will include: employee_number, forename, surname, total_leave, leave_remaining (to be calculated)
3
2980
by: jburris | last post by:
I have been through enough of these threads to think that this should be an easy fix... but, are there circumstances in which the following code syntax does not work? =!!.Form! (this is out of the Access bible) Specifically, I am adapting the Orders database from the Access templates for my use. I deleted the payments table and am recording them as a field in the Order Details table so that payment is directly tied to each product...
2
1994
by: Bruce | last post by:
Hi, I have 3 nested forms and wish to calculate a value on Subform 1 by adding 2 values on the same subform + to a value in a control on the footer of the underlying subform . I use this as the recordsource for my total =.Form!Sumpd++) which works well except when there are no records in the transactiontbl subform - I get an error.
15
2660
by: Jimmy Stewart | last post by:
I want to use a calculated function for the caption on my tab controls. I used the following code: Me.Page28.Caption = "Expenses & "]" This should display the following: " Expenses " where 10 is the number of expenses on that page. On my form I have a calculated control named 'ExpenseEntryCount' that correctly displayd this information. If I place this code in the forms OnOpen, OnActivate or OnCurrent event,
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9988
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9923
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6640
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3911
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
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.