Total sum of cost

D

danlavish

I need a total cost field to calculate the sum of a field and for it
to appear in my query as a field any help would be cool
 
K

Ken Snell \(MVP\)

Please give us more details about your query's design, table fields and
data, etc. Most likely, you can use a Totals query to do what you wish, but
we need more information to provide a usable solution.
 
V

vb_Dumb

Please give us more details about your query's design, table fields and
data, etc. Most likely, you can use a Totals query to do what you wish, but
we need more information to provide a usable solution.
--

        Ken Snell
<MS ACCESS MVP>http://www.accessmvp.com/KDSnell/






- Show quoted text -

I have five queries for five forms all of them are pretty much the
same each has a field called 'total cost' for total scrap cost on the
footer i have a field called total cost of department i need a updated
total cost of all the forms scrap costs i hope this helps...?
 
K

Ken Snell \(MVP\)

Open one of your queries in Design View. Then click on Query View icon on
toolbar and select SQL View. Copy all the text that you see in that window,
and paste it back into a reply to this post.

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


Please give us more details about your query's design, table fields and
data, etc. Most likely, you can use a Totals query to do what you wish,
but
we need more information to provide a usable solution.
--

Ken Snell
<MS ACCESS MVP>http://www.accessmvp.com/KDSnell/






- Show quoted text -

I have five queries for five forms all of them are pretty much the
same each has a field called 'total cost' for total scrap cost on the
footer i have a field called total cost of department i need a updated
total cost of all the forms scrap costs i hope this helps...?
 
V

vb_Dumb

Open one of your queries in Design View. Then click on Query View icon on
toolbar and select SQL View. Copy all the text that you see in that window,
and paste it back into a reply to this post.

--

        Ken Snell
<MS ACCESS MVP>http://www.accessmvp.com/KDSnell/







I have five queries for five forms all of them are pretty much the
same each has a field called 'total cost' for total scrap cost on the
footer i have a field called total cost of department i need a updated
total cost of all the forms scrap costs i hope this helps...?

SELECT [EPT Table].[DMR Number], [EPT Table].[Date Rejected], [EPT
Table].[Name of Originator], [EPT Table].[Item Location], [EPT Table].
[Purchase Order Number], [EPT Table].[Lot Quantity], [EPT Table].[Qty
Rejected], [EPT Table].[Part Name], [EPT Table].[Part Number], [EPT
Table].[Manufacturer Date Code], [EPT Table].[Found During What
Activity], [EPT Table].[Customers Part Number], [EPT Table].[Part
Supplier], [EPT Table].[Nonconformance Part], [EPT
Table].Nonconformance, [EPT Table].[Cost Per Part], [EPT Table].[Total
Cost], [EPT Table].[Rework Instructions], [EPT Table].Close, [EPT
Table].[Quality Inspection Details], [EPT Table].[Disposition Summary
IQC], [EPT Table].[Disposition Qty], [EPT Table].[Rework To Be Done
By], [EPT Table].[Total Est Rework Cost], [EPT Table].Importance, [EPT
Table].[Total Hours], [EPT Table].[Temporary Deviation Number], [EPT
Table].[Quanity Inspected], [EPT Table].[Vendor Responsible], [EPT
Table].[Corrective Action Issued], [EPT Table].[CAR Number], [EPT
Table].[Quality Report Number], [EPT Table].[Print Number], [EPT
Table].[Revision Level], [EPT Table].[Scrap Quanity], [EPT Table].
[Heater Type], [EPT Table].Cause, [EPT Table].[Other Cause], [EPT
Table].[Description of Issue], [EPT Table].[Discrepancy QM Signature],
[EPT Table].[Discrepancy QM Date], [EPT Table].[Discrepancy Purch
Signature], [EPT Table].[Discrepancy Purch Date], [EPT Table].[Quality
Inspection Signature], [EPT Table].[Quality Inspection Date], [EPT
Table].[Dispo Purch Signature], [EPT Table].[Dispo Purch Date], [EPT
Table].[Reinspected Signature], [EPT Table].[Reinspected Date], [EPT
Table].[NCR Closed By], [EPT Table].[NCR Closed By Date], [EPT Table].
[MRB Engineering Name], [EPT Table].[MRB QA Name], [EPT Table].[MRB
Exeutive Name], [EPT Table].[MRB Engineering Signature], [EPT Table].
[MRB QA Signature], [EPT Table].[MRB Exeutive Signature], [EPT Table].
[MRB Engineering Date], [EPT Table].[MRB QA Date], [EPT Table].[MRB
Exeutive Date], [EPT Table].FilePath, [EPT Table].[Sent To], [EPT
Table].[Total Cost of Department], [EPT Table].[Action Overdue], [EPT
Table].[Audit Number]
FROM [EPT Table];
 
K

Ken Snell \(MVP\)

Add a calculated field to the query (see last field in the query below):

SELECT [EPT Table].[DMR Number], [EPT Table].[Date Rejected], [EPT
Table].[Name of Originator], [EPT Table].[Item Location], [EPT Table].
[Purchase Order Number], [EPT Table].[Lot Quantity], [EPT Table].[Qty
Rejected], [EPT Table].[Part Name], [EPT Table].[Part Number], [EPT
Table].[Manufacturer Date Code], [EPT Table].[Found During What
Activity], [EPT Table].[Customers Part Number], [EPT Table].[Part
Supplier], [EPT Table].[Nonconformance Part], [EPT
Table].Nonconformance, [EPT Table].[Cost Per Part], [EPT Table].[Total
Cost], [EPT Table].[Rework Instructions], [EPT Table].Close, [EPT
Table].[Quality Inspection Details], [EPT Table].[Disposition Summary
IQC], [EPT Table].[Disposition Qty], [EPT Table].[Rework To Be Done
By], [EPT Table].[Total Est Rework Cost], [EPT Table].Importance, [EPT
Table].[Total Hours], [EPT Table].[Temporary Deviation Number], [EPT
Table].[Quanity Inspected], [EPT Table].[Vendor Responsible], [EPT
Table].[Corrective Action Issued], [EPT Table].[CAR Number], [EPT
Table].[Quality Report Number], [EPT Table].[Print Number], [EPT
Table].[Revision Level], [EPT Table].[Scrap Quanity], [EPT Table].
[Heater Type], [EPT Table].Cause, [EPT Table].[Other Cause], [EPT
Table].[Description of Issue], [EPT Table].[Discrepancy QM Signature],
[EPT Table].[Discrepancy QM Date], [EPT Table].[Discrepancy Purch
Signature], [EPT Table].[Discrepancy Purch Date], [EPT Table].[Quality
Inspection Signature], [EPT Table].[Quality Inspection Date], [EPT
Table].[Dispo Purch Signature], [EPT Table].[Dispo Purch Date], [EPT
Table].[Reinspected Signature], [EPT Table].[Reinspected Date], [EPT
Table].[NCR Closed By], [EPT Table].[NCR Closed By Date], [EPT Table].
[MRB Engineering Name], [EPT Table].[MRB QA Name], [EPT Table].[MRB
Exeutive Name], [EPT Table].[MRB Engineering Signature], [EPT Table].
[MRB QA Signature], [EPT Table].[MRB Exeutive Signature], [EPT Table].
[MRB Engineering Date], [EPT Table].[MRB QA Date], [EPT Table].[MRB
Exeutive Date], [EPT Table].FilePath, [EPT Table].[Sent To], [EPT
Table].[Total Cost of Department], [EPT Table].[Action Overdue], [EPT
Table].[Audit Number],
DSum("Total Cost", "EPT Table") AS GrandTotalCost
FROM [EPT Table];


Are you wanting to show this on a report? If yes, then there's no need to
add the calculated field to the query. Just add a textbox to the report's
ReportFooter section, and set its ControlSource to this:

=Sum([Total Cost])

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



Open one of your queries in Design View. Then click on Query View icon on
toolbar and select SQL View. Copy all the text that you see in that
window,
and paste it back into a reply to this post.

--

Ken Snell
<MS ACCESS MVP>http://www.accessmvp.com/KDSnell/







I have five queries for five forms all of them are pretty much the
same each has a field called 'total cost' for total scrap cost on the
footer i have a field called total cost of department i need a updated
total cost of all the forms scrap costs i hope this helps...?

SELECT [EPT Table].[DMR Number], [EPT Table].[Date Rejected], [EPT
Table].[Name of Originator], [EPT Table].[Item Location], [EPT Table].
[Purchase Order Number], [EPT Table].[Lot Quantity], [EPT Table].[Qty
Rejected], [EPT Table].[Part Name], [EPT Table].[Part Number], [EPT
Table].[Manufacturer Date Code], [EPT Table].[Found During What
Activity], [EPT Table].[Customers Part Number], [EPT Table].[Part
Supplier], [EPT Table].[Nonconformance Part], [EPT
Table].Nonconformance, [EPT Table].[Cost Per Part], [EPT Table].[Total
Cost], [EPT Table].[Rework Instructions], [EPT Table].Close, [EPT
Table].[Quality Inspection Details], [EPT Table].[Disposition Summary
IQC], [EPT Table].[Disposition Qty], [EPT Table].[Rework To Be Done
By], [EPT Table].[Total Est Rework Cost], [EPT Table].Importance, [EPT
Table].[Total Hours], [EPT Table].[Temporary Deviation Number], [EPT
Table].[Quanity Inspected], [EPT Table].[Vendor Responsible], [EPT
Table].[Corrective Action Issued], [EPT Table].[CAR Number], [EPT
Table].[Quality Report Number], [EPT Table].[Print Number], [EPT
Table].[Revision Level], [EPT Table].[Scrap Quanity], [EPT Table].
[Heater Type], [EPT Table].Cause, [EPT Table].[Other Cause], [EPT
Table].[Description of Issue], [EPT Table].[Discrepancy QM Signature],
[EPT Table].[Discrepancy QM Date], [EPT Table].[Discrepancy Purch
Signature], [EPT Table].[Discrepancy Purch Date], [EPT Table].[Quality
Inspection Signature], [EPT Table].[Quality Inspection Date], [EPT
Table].[Dispo Purch Signature], [EPT Table].[Dispo Purch Date], [EPT
Table].[Reinspected Signature], [EPT Table].[Reinspected Date], [EPT
Table].[NCR Closed By], [EPT Table].[NCR Closed By Date], [EPT Table].
[MRB Engineering Name], [EPT Table].[MRB QA Name], [EPT Table].[MRB
Exeutive Name], [EPT Table].[MRB Engineering Signature], [EPT Table].
[MRB QA Signature], [EPT Table].[MRB Exeutive Signature], [EPT Table].
[MRB Engineering Date], [EPT Table].[MRB QA Date], [EPT Table].[MRB
Exeutive Date], [EPT Table].FilePath, [EPT Table].[Sent To], [EPT
Table].[Total Cost of Department], [EPT Table].[Action Overdue], [EPT
Table].[Audit Number]
FROM [EPT Table];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top