Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totals on Report Problem

Status
Not open for further replies.

bburch1

Technical User
Dec 8, 2004
5
US
I have a simple database for tracking defects. On a given date and part number, I may have 10 different defects. Below are the two tables I have.

Header Table Detail Table
ID ID
Date Defect Type
Part Number Qty
Total Packed

My query returns multiple records from the detail table for every record in the header table. On the report, when I try to total the Total Packed field, I get the total for every line of detail. Example: If I have one part number on 11/20/04 and Total Packed of 240, with 5 different defects, I get 1200 for the Sum of Total Packed. How do I fix this?
 
bburch1
From your post, I assume it's the Qty field that indicates the number defective. If that's the case, in your report footer, put
=Sum([Qty])

Tom
 
I'm trying to sum the Total Packed Field. The problem is that the query returns an ID, Date, Total Packed,Part Number, Defect, and Qty for every line. When the report tries to total the Total Packed field, it total every line. If I have five defects for one day, the Total Packed field will be added five times.
 
3 questions...
1. Are the Total Packed numbers showing correctly in the Detail section?
2. What expression are you using to get the total?
3. Where are you placing the expression?

Tom
 
If I understand correctly, you want to sum a value that is stored in the parent record. One solution is to place the value in a text box in the parent group header and set the running sum property to Over All. Then add a text box to the report footer with a control source of:
=txtNameOfRunningSumControlInParentHeader

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top