473,414 Members | 2,030 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,414 software developers and data experts.

Text Field in a Form summing up the Values in a Subform

Hi-
I am having issues with adding up fields in a subform. I have a form that has a subform in datasheet mode. It lists titles of books with their correlating units [OH] and dollar amount [OHExtRetail].

The user will be able to delete records from this subform. I am trying to add in text boxes that list the sum of oh, the sum of extretail, and the count of titles.

I have tried it the three ways below with no luck... (I'll give examples with the OH field):

1. By putting in a text box in the footer of the subform. The control source reads =Sum([OH])
The issue I have with this is that I cannot get the footer to show up when the form is activated. The property is set on visible. I think the issue may be that I have the subform in datasheet mode (which I need for it to be in).

2. I then tried putting the text fields into the main form. I changed the Control Source to read = Sum([Forms}![tbletempreturnworkbook subform]![OH])
No luck.

3. I have a query that actually calculates the count of titles, the sum of OH and the sum of ExtRetail. So I tried this for the Control Source =[qryreturnworkbooktotals]![Units]
No luck.

Any ideas?

Thanks in advance.
Sep 8 '06 #1
3 3620
PEB
1,418 Expert 1GB
Return to option 2 and try:
= Sum([tbletempreturnworkbook subform].Form![OH])
Sep 8 '06 #2
Thanks, but I still get an error...

When I try to save the change, Access eliminates the brackets around the OH, so it ends up reading:

=Sum([tbletempreturnworkbook subform].Form!OH)

I tried using the expression builder in Access to read off the table where the data is coming from and then I tried the subform, but still nothing.

Is it possible to do what I'm trying to do in Access? I know it can be done on reports as I have it working there, but I've never seen it on a Form before.

Thanks for any help you can give.
Sep 11 '06 #3
To get a sum from a subform which is a datasheet have a texbox named say SubformSum in the subform with a control source of
Expand|Select|Wrap|Line Numbers
  1. =Sum([Field_Name]) 
in the footer. In your mainform footer have a textbox with a control source
Expand|Select|Wrap|Line Numbers
  1. =SubFormName.Form!SubFormSum
. I just tried it out and it works...
Nov 13 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text box that references a field on the subform. What I'd like it to do is show the value...
3
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to...
25
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...
3
by: ChadDiesel | last post by:
I'm new to Access and need some advice. I am trying to setup a database to print labels and reports for our shipments. I have set up a table with fields such as I have taken a snapshot of what...
1
by: ChadDiesel | last post by:
I'm new to access and need some help. I have a form with a shipment destination at the top. I then have a subform that I enter boxes for that shipment. I have several shipments going at a...
9
by: Susan Bricker | last post by:
Greetings. I am having trouble populating text data that represents data in my table. Here's the setup: There is a People Table (name, address, phone, ...) peopleID = autonumber key There...
2
by: AA Arens | last post by:
Somebody willing to assist me in the following? I want to have values from one field copied to another field when I choose choose a item from a drop down menu. I have 2 forms: 1 Company...
1
by: sjvandevoorde | last post by:
I need some help with a couple forms/test fields. Bare with me I have been out of the field for some time and only consider myself an intermediate user. The first one is a subfrom which lists...
5
by: vsteshenko | last post by:
Hello, This is my second post to the any usernet group and the first one was posted to the wrong one. I am currently working on creating an order form for sales associates at my work to be used...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.