473,783 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running Subtotal of Text Values on a SubForm

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
time, so I can use the control at the bottom of the form to move from
shipment to shipment and I can see all the boxes in each shipment.

I'd like to put a subtotal for the shipment weight and box types at the
bottom of the subform.

I placed =Sum([Weight]) in the footer of the subform and it works fine.
When I switch to the next shipment, it shows a total for just that
shipment-just what I want.

The problem is with text values. I want to have running total of each type
of box I have. I have a field called Box_Type that contains text values
like Assembly Box, Regular Box, Small Box, etc. I would to have running
totals in the footer like this:

Total Assembly Boxes:

Total Regular Boxes:

Total Small Boxes:

These are text values, so I need to count every time the value is "Assembly
Box" for example.

I tried to use the Dcount function with the value = "Assembly Box", but it
gives me a total for the entire table and not just the shipment. I guess
this is because you have to specify the table in the conditions.

What I was thinking is to use the =Count([Box_Type]) with some kind of
condition that it counts "Assembly Box" or whatever other types.

I'm new to Access, so I might not be using the right terminology or going at
the problem the right way. Any information would be appreciated.

Thanks,

Chad
Nov 13 '05 #1
1 2879
Hi Chad

Before you come to the counting problem, I strongly suggest you have a table
of BoxTypes and use a combo box to select the right type of box. The reason
being that Assembly Box is not the same as AssemblyBox or Asembly Box. So
there will be a strong probability of a miscount anyway. Apart from that it
is much quicker to select the box type rather than type (or miss type) it
in.
So the Boxes table will also have a ShipmentID, Box Number, BoxTypeID as
well as the weight.

You may then be able to gave an expression like
DCount("BoxType ID","Boxes","Bo xTypeID = 2 AND ShipmentID =
Forms!Shipments !ShipmentID")
That should find the second type of box.

HTH

Phil
"ChadDiesel " <sh************ ***********@yah oo.com> wrote in message
news:zI******** *******@newsrea d2.news.atl.ear thlink.net...
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
time, so I can use the control at the bottom of the form to move from
shipment to shipment and I can see all the boxes in each shipment.

I'd like to put a subtotal for the shipment weight and box types at the
bottom of the subform.

I placed =Sum([Weight]) in the footer of the subform and it works fine.
When I switch to the next shipment, it shows a total for just that
shipment-just what I want.

The problem is with text values. I want to have running total of each
type
of box I have. I have a field called Box_Type that contains text values
like Assembly Box, Regular Box, Small Box, etc. I would to have running
totals in the footer like this:

Total Assembly Boxes:

Total Regular Boxes:

Total Small Boxes:

These are text values, so I need to count every time the value is
"Assembly
Box" for example.

I tried to use the Dcount function with the value = "Assembly Box", but it
gives me a total for the entire table and not just the shipment. I guess
this is because you have to specify the table in the conditions.

What I was thinking is to use the =Count([Box_Type]) with some kind of
condition that it counts "Assembly Box" or whatever other types.

I'm new to Access, so I might not be using the right terminology or going
at
the problem the right way. Any information would be appreciated.

Thanks,

Chad

Nov 13 '05 #2

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

Similar topics

0
1382
by: J. T. | last post by:
I'm fairly new to XSL, but have made some good progress in picking it up for the project I'm currently working on. I've been trying to figure out how to design a stylesheet that would transform the XML I'm recieving so that the tax information I'm recieving per item could be grouped and added per state and have the new subtotal node located inside the last node of a particular STORE value. I'm trying to use the Muenchian Method, but I...
3
5883
by: Charlene | last post by:
I have an Invoice/Invoice Details form/subform. In the page footer of the Invoice Details subform I have a textbox with the control source set to =Sum(). I then pull this value into the main form with a textbox whose control source is =!. This works fine when there are one or more line items in Invoice Details but on a new invoice before any invoice details are entered, the textbox on the main form shows #Error. I would like it to show...
3
1693
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 I would like to do: http://www.chadworld.com/images/form.jpg All of these fields are in a table called: Ship_Info
3
3642
by: Kitana907 | last post by:
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 and dollar amount . 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...
3
2234
by: xian2 | last post by:
Hi All, I am trying to create a subtotal text box much like the one in the orders form of the northwind database where you have a subtotal text box in the footer of the subform and then have that displayed as a text box in the main form. However, I am having difficulties in doing this and keep getting #Error or #Name? displayed in it. Any Ideas would be much appreciated. Background info: Form = Tours
5
3977
by: mebrabham | last post by:
Hello, I am trying to create a running subtotal in a query and then graph the running subtotal for each city group. The data looks like this in the table (for illustration): My City My Date Cumulative Sum Daily Sum DC 03-Apr-07 6 6 DC 04-Apr-07 20 14 DC 05-Apr-07 0 0 DC 06-Apr-07 24 4
1
2762
by: BrianMiller | last post by:
I have searched for an answer but have failed to come up with anything that seems to work. I am trying to set up an Access 2003 database for home accounts. I want to create a running sum (a balance based on what has been spent or paid in). I have a table called tblCardBankPymnts. In that I have a Figure column for what transaction has been done. I also have a Balance column but think I should not have this now. I then have a form to...
2
1945
by: murch.alexander | last post by:
Hi all, I have a query that uses a subquery to subtotal one of its fields. This part is working fine. The twist is that when I encounter certain values, I want to reset the subtotal to zero and continue on. So, it's possible that out of 100 records, I might reset the subtotal to zero 20 times. I can do this in a report but I need it in query form so I can run it automatically when users log in to let them know if the subtotal has
12
4304
by: etmanage | last post by:
I have a subform that totals a subtotal in the form footer. It works fine. I then pull that value onto the main form into a textbox called Subtotal2 by setting the control source =OrderSubform.Form!Subtotal and it seems to work fine. When I try to reference the Subtotal2 text box to perform calculations on it it doesn't work. For instance when in vba I set Me.tax = Me.Subtotal2 * TaxRate I get zero. I tried just saying Me.tax =...
0
9643
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
9480
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
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
5379
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4044
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
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.