G
Guest
How can I calculate line total in msaccess query?
Please give me an example or other way.
Please give me an example or other way.
Rick B said:Just add a new column to your query with...
LineTotal: [SomeField1] + [SomeField2] + [SomeField3]
Etc.
--
Rick B
Kutty said:How can I calculate line total in msaccess query?
Please give me an example or other way.
Kutty said:Dear Rick,
How can I do this total calculation?
=Sum(field name) in criteria?
------------------------------------------------------
Rick B said:Just add a new column to your query with...
LineTotal: [SomeField1] + [SomeField2] + [SomeField3]
Etc.
--
Rick B
Kutty said:How can I calculate line total in msaccess query?
Please give me an example or other way.
Rick B said:That is a column total, not a line total.
I don't think you can list all the items AND include a total in one query.
--
Rick B
Kutty said:Dear Rick,
How can I do this total calculation?
=Sum(field name) in criteria?
------------------------------------------------------
Rick B said:Just add a new column to your query with...
LineTotal: [SomeField1] + [SomeField2] + [SomeField3]
Etc.
--
Rick B
How can I calculate line total in msaccess query?
Please give me an example or other way.
Kutty said:Sorry, that is a line total. I hope I can total that. But please tell me
how to do.
-------------------------------------------------------------------------- ---------
Rick B said:That is a column total, not a line total.
I don't think you can list all the items AND include a total in one query.
--
Rick B
Kutty said:Dear Rick,
How can I do this total calculation?
=Sum(field name) in criteria?
------------------------------------------------------
:
Just add a new column to your query with...
LineTotal: [SomeField1] + [SomeField2] + [SomeField3]
Etc.
--
Rick B
How can I calculate line total in msaccess query?
Please give me an example or other way.
Rick B said:No, that is a COLUMN total.
Columns go up and down (vertical). They contain data from multiple records
for one field.
Lines (actually called rows) go accross and contain information from one
record for multiple fields.
If you want a column total (all the values from a column added together) you
can create a total query. You can also create a separate detail query. I
don't think you can have them both in one query.
If you want a line total (several fields on one line/record added together)
then you'd create a new column on your LINE and put in a formula as I
indicated.
--
Rick B
Kutty said:Sorry, that is a line total. I hope I can total that. But please tell me
how to do.
-------------------------------------------------------------------------- ---------
Rick B said:That is a column total, not a line total.
I don't think you can list all the items AND include a total in one query.
--
Rick B
Dear Rick,
How can I do this total calculation?
=Sum(field name) in criteria?
------------------------------------------------------
:
Just add a new column to your query with...
LineTotal: [SomeField1] + [SomeField2] + [SomeField3]
Etc.
--
Rick B
How can I calculate line total in msaccess query?
Please give me an example or other way.
oh I got what you said Rick. Thanks. You told me lineTotal: [SomeField1] +
[SomeField2] + [SomeField3]
In my program there are some members in a mess membership. Mess will
calculate monthly. For example if there is 5 people in the mess end of month
mess
manager will calculate. I need total members' total mess amount. In case
sometimes one will added or deleted. The way you told is ok for small head
count.
But say if the mess run by a big company more than 5,000 head count we
cannot do the way you told. Also this calculation will be from a sub form.
in sub form any time we can add or delete persons. In this case what will do?
Would appreciate your information.
John Vinson said:oh I got what you said Rick. Thanks. You told me lineTotal: [SomeField1] +
[SomeField2] + [SomeField3]
In my program there are some members in a mess membership. Mess will
calculate monthly. For example if there is 5 people in the mess end of month
mess
manager will calculate. I need total members' total mess amount. In case
sometimes one will added or deleted. The way you told is ok for small head
count.
But say if the mess run by a big company more than 5,000 head count we
cannot do the way you told. Also this calculation will be from a sub form.
in sub form any time we can add or delete persons. In this case what will do?
Would appreciate your information.
In your original question you asked for a "line total".
Rick explained correctly how to calculate a "line total".
Now you are saying that you do NOT want a line total; you want a
column total. That is a different question, with a different answer.
On your Subform's footer you can put a textbox with its Control Source
set to
=Sum([fieldname])
to sum the field [fieldname] across all five (or 5000) records
displayed on the subform.
John W. Vinson[MVP]
I have done this method at home, in my laptop. The programming this way is
working properly. Msaccess version is 2002 in my laptop. But the same
program I copied and brought in my office and pasted to my computer. Colum
total in the field “SPENT” and “DAY” not working. Both fields are empty.
Why? Is this version problem?
Recordsource of my form is table. I am not much sure about SQL.
Controlsource properties of "Spent" and "Day" is
=[Table2 subform]!Text14
=[Table2 subform]!Text18 respectively.
Field name of Spent in Sub Form footer is "Text14"
Controlsource of field name "Spent" is =Sum([SPENT])
Field name of Day in Sub For footer is "Text18"
Controlsource of field name "Day" is = Sum([DAY])