473,387 Members | 1,485 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,387 software developers and data experts.

How to calculate or create subtotal of the data within the subform

Andd other I need to know is if there are specific data inside the subform how I create a subtotal or a total of input parts and pullout parts. Example if they search a parts how many pullout and how many are available. How I will create a subtotal or total of parts on hand and parts pull-out.

Thank you for your help.
Jul 16 '19 #1

✓ answered by NeoPa

Aggregating functions such as Sum() & Count() are available to formulae that can be used in Controls on Forms. I forget whether it's the Fields or the Controls that must be referenced but one is likely to work and the other not.

NB. This is a situation where the default behaviour of naming the Controls with the same name as the Fields can cause you issues. As always, the advice is not to use this default and give them a meaningful name that includes a short code (usually 3 letter) as prefix to indicate the type of the Control.

Fields are where data is stored within a table. Controls are where data is shown on a Form or Report. Though they often show data from Fields they are NOT Fields. They are Controls. Controls may be Bound, where the Control shows data directly from a Field, or Unbound where they don't, but can show the results of a formula if required, or simply allow data to be typed into the Form itself.

Data is shown on a Form (or Report). Forms & Reports neither store nor contain data. No more than queries do.

4 1312
NeoPa
32,556 Expert Mod 16PB
Aggregating functions such as Sum() & Count() are available to formulae that can be used in Controls on Forms. I forget whether it's the Fields or the Controls that must be referenced but one is likely to work and the other not.

NB. This is a situation where the default behaviour of naming the Controls with the same name as the Fields can cause you issues. As always, the advice is not to use this default and give them a meaningful name that includes a short code (usually 3 letter) as prefix to indicate the type of the Control.

Fields are where data is stored within a table. Controls are where data is shown on a Form or Report. Though they often show data from Fields they are NOT Fields. They are Controls. Controls may be Bound, where the Control shows data directly from a Field, or Unbound where they don't, but can show the results of a formula if required, or simply allow data to be typed into the Form itself.

Data is shown on a Form (or Report). Forms & Reports neither store nor contain data. No more than queries do.
Jul 17 '19 #2
Hi NoePa sorry for late reply I'm online only during evening after work. I use the subtraction. This is what I did in my database. I create a table then one of the fields is quantity. I created the main form that I called mpis and the table is called table:mpis. Now I have another table and also I created the table with mostly of the field name is the same of the main table. Because this table is the Pullout where my user when they pullout the parts they will click the pullout button that all the pullout parts will go in this table using the form I created. Now this form I name it Epopi that have also a field called EPOPI. So this form that have name EPOPI and have a table that have a field called quantity will subtract to the table fieild called quantity. I tried what you stated above but sadly the error on the text box I use where I put the expression formula is name or ERRor. And I forgot I use the subform on the mainform. I tried the table as my data source and also the table query. And I hope you will help me with this db problem.
Jul 17 '19 #3
Sorry I'm wrong the EPOPI that have a field name also called quatity.
Jul 17 '19 #4
NeoPa
32,556 Expert Mod 16PB
I thought I had helped you :-s What is it about what I posted earlier that you're struggling with. I can't help unless I know what you've done with what's already there and I don't understand, from what you've said, anything that relates to my post at all.
Jul 17 '19 #5

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

Similar topics

1
by: Nick Evans | last post by:
Hey all, I am currently working on a simple program (small group membership database) just to get to grips with the language (bit of a newbie here :-)) and am wondering about the best way of...
1
by: Steve | last post by:
Hi, I am new to XML and PHP and have a question that I hope someone could answer. Some background on my problem. I am receiving an XML message over TCP/IP and need to access data within the...
1
by: Rein Petersen | last post by:
Is there a specification that defines how one might import xml data within another xml document using a URL ? If so, will it work in .NET? Rein
1
by: Luc Balemans | last post by:
Running Access 2002 (10.0) Is it possible to format data within a text box (a) on a form or (b) on a report? E.g. botanical names in Latin: <Hydrangea macrophylla subsp. serrata>, with the...
1
by: Momo4 | last post by:
I have a unbound main form with unbound fields that correspond to fields on a bound data sheet subform. As you enter data on the subform, the corresponding fields get updated through code (e.g....
2
by: Steve Teeples | last post by:
I learned that C# doesn't allow global variables within a project. However, I have a structure that I wish to store data within. The data is retrieved from multiple forms within my project. How...
2
by: SaT | last post by:
Does anyone know how to create hyperlink labels within a datagrid, on the fly? Thanks SaT
5
by: ingrammx | last post by:
I would like to add a "counter ID" to a set of grouped data within a query. For example, if I have 5 records, 2 with a value of A and 3 with a value of B, I would like to see the following results:...
8
by: Mike | last post by:
Hi, If protect MS Access with password it doesn't mean to much. On internet, we can find plenty tools for opening forgotten passwords etc. I have a small c# aplication wit large amount of...
0
ADezii
by: ADezii | last post by:
Rather than using CurrentProject.Connection or entering your own Connection information, ADO supports storing Connection information in an external file called a Data Link File (which normally has a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
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
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...

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.