From: KARL DEWEY on 2 Apr 2010 16:16 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.
|
Pages: 1 Prev: =Count([Category] if it is equal to 'Task ID'"), how do I fix thi Next: CHECK BOX |