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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum negatives

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Joined
Jul 20, 2004
Messages
337
Location
US
I have a query that is supposed to sum values, but when it gets a negative value it lists it separately instead of adding or subtracting with the rest of the fields values.

Here is the code. I have never seen it do this before. Also this is Access 2007

SELECT [Negative Carryover].[Employee Number], [Negative Carryover].Name, Sum([Negative Carryover].[Allocated Bonus]) AS [SumOfAllocated Bonus]
FROM [Negative Carryover] LEFT JOIN lastmonthsnegative ON [Negative Carryover].[Employee Number] = lastmonthsnegative.[Employee Number]
GROUP BY [Negative Carryover].[Employee Number], [Negative Carryover].Name;

Thanks in advance for any help

Micki
 
Negative Carryover].Name is probably different for an employee and is likely causing the problem.

You could simply remove this field from the grouping if you are trying to find the sum by employee.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top