If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Duplicate values added together and print only once on report
Use this --
SELECT [Equip Code], [Department], [Qty ext], [Qty new], [Cost], Sum([Qty new] * [Cost]) AS Total FROM YourTable GROUP BY [Equip Code], [Department], [Qty ext], [Qty new], [Cost]; -- Build a little, test a little. "Mommybear" wrote: I am fairly new to Access 2007 and am trying to create a report. I have the following records and fields: Equip Code Department Qty ext Qty new Cost AB1 JH1 1 0 100 AB1 JH1 2 3 100 AB2 JH1 0 1 200 AB2 JH2 1 1 200 and need this to appear in a report by Grouped by Department with only one line per equip code as follows: Equip Code Department Qty ext Qty new Cost Total AB1 JH1 3 3 100 300 AB2 JH1 0 1 200 200 AB2 JH2 1 1 200 200 Whereas the Dept JH1 and Equip code AB1 is combined on one line. I created a query to sort these by Department but how do I get them to total together and only print 1 line on the report. |
Thread Tools | |
Display Modes | |
|
|