Hi all! I am trying to have a query return the sum of hours in a certain field. My problem is that when I use the Total Sum, the sum does not add up to the real sum. I can't seem to find out why. I know the query is pulling data from a numeric field and that when I don't Sum it return the correct records. Another peice of information is that some of the numbers are negative, but for some records it sums right and for others it does not, but it does not give me any error massages. I am using Access 2000. Here is the SQL:
Thank you for your help!!!!!
Code:
SELECT [9A FML hours].ID, [9A FML hours].[DeptID Short], [9A FML hours].TRC, Sum([9A FML hours].Quantity) AS SumOfQuantity, [9A FML hours].[Hrs Yr], [FLSA status].[Sal Plan] FROM [9A FML hours] LEFT JOIN [FLSA status] ON [9A FML hours].ID = [FLSA status].ID GROUP BY [9A FML hours].ID, [9A FML hours].[DeptID Short], [9A FML hours].TRC, [9A FML hours].[Hrs Yr], [FLSA status].[Sal Plan] HAVING ((([9A FML hours].TRC)="FEX") AND ((Sum([9A FML hours].Quantity))>0)) ORDER BY [9A FML hours].[Hrs Yr];
Comment