A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Duplicate values added together and print only once on report



 
 
Thread Tools Display Modes
  #1  
Old April 2nd, 2010, 09:16 PM posted to microsoft.public.access.reports
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.