Suppressing results from SUM

Local time
Today, 14:39
Joined
Sep 28, 2010
Messages
83
Morning folks,

I'm delving into the world of Access again and have run up against a little issue..

I have a table of expenditure information against a number of accounts. The data is broken down on G/L code, Cost Centre and a number of other elements.
I need to be able to suppress spend against a particular G/L is expenditure has been incurred in another (related G/L)..

Is there a neat way of achieving that in a query, or would it be easier to just calculate the two values and subtract one from the other?

TIA,

slinky
 
To flesh it out a little, here's the query I'm using at the moment..

Code:
SELECT [GWPI-Combined].[Agency Number], [Commissioned Expenditure Data].[G/L Account No], Sum([Commissioned Expenditure Data].Amount) AS SumOfAmount, GSC_CRR.[CRR Value], [GWPI-Combined].[GWPI 2012], [GWPI-Combined]![GWPI 2012]*(GSC_CRR![CRR Value]/100) AS Income, [Income]-[SumOfAmount] AS Variance
FROM GSC_CRR INNER JOIN ([GWPI-Combined] RIGHT JOIN [Commissioned Expenditure Data] ON [GWPI-Combined].[Agency Number] = [Commissioned Expenditure Data].[Group Secretary Code]) ON GSC_CRR.[Group Secretary Code] = [Commissioned Expenditure Data].[Group Secretary Code]
WHERE ((([Commissioned Expenditure Data].TransaxYear)=2012))
GROUP BY [GWPI-Combined].[Agency Number], [Commissioned Expenditure Data].[G/L Account No], GSC_CRR.[CRR Value], [GWPI-Combined].[GWPI 2012], [GWPI-Combined]![GWPI 2012]*(GSC_CRR![CRR Value]/100);
 
Scrub that, I've had an extra cup of coffee and my brain has started working!
It's simple when you stop and look at it
 

Users who are viewing this thread

Back
Top Bottom