I need to generate a report that reflects the budget amount, mtd expenditures and ytd expenditures.
Each query has a fund, program and account fields and then an amount field. The report has to verify that these fields equal each other. I ( with this websites help) have generated 3 queries that reflects one amount for each the fund program and account.
Query #1 sql (appropriations):
SELECT APPROPRIATIONS.FUND, APPROPRIATIONS.PROGRAM, APPROPRIATIONS.ACCOUNT, Sum(APPROPRIATIONS.[BUDGET AMOUNT]) AS [SumOfBUDGET AMOUNT]
FROM APPROPRIATIONS
GROUP BY APPROPRIATIONS.FUND, APPROPRIATIONS.PROGRAM, APPROPRIATIONS.ACCOUNT;
query #2 mtd expenditures (SQL):
SELECT [mtd expenditures].FUND, [mtd expenditures].PROGRAM, [mtd expenditures].ACCOUNT, Sum([mtd expenditures].AMOUNT) AS SumOfAMOUNT
FROM [mtd expenditures]
WHERE ([mtd expenditures].[POST DATE]>#3/31/2015#) And ([mtd expenditures].[POST DATE]<#5/1/2015#)
GROUP BY [mtd expenditures].FUND, [mtd expenditures].PROGRAM, [mtd expenditures].ACCOUNT;
query #3 ytd expenditures (SQL):
SELECT [mtd expenditures].FUND, [mtd expenditures].PROGRAM, [mtd expenditures].ACCOUNT, Sum([mtd expenditures].AMOUNT) AS SumOfAMOUNT
FROM [mtd expenditures]
GROUP BY [mtd expenditures].FUND, [mtd expenditures].PROGRAM, [mtd expenditures].ACCOUNT;
Someone from the report forum told me I need to generate one table from these 3 queries....but I don't know how to do that.
Thanks