I have this query used to create a monthly report:
SELECT tblAPPLICATIONS.SPECIALIST, tblAPPLICATIONS.REPORTS, Avg(DateDiff("d",[DATE RECEIVED],[DATE OF DECISION])) AS DAYS, dateadd("yyyy",-1,dateadd("m",1,date())-day(dateadd("m",1,date()))+1) & " - " & dateadd("m",1,date())-day(dateadd("m",1,date())) AS [REPORT PERIOD], Format(Int([Days]/365),"00-") & Format(Int((([Days] Mod 365)/30)),"00-") & Format(([Days]-(Int([Days]/365)*365+Int(([Days] Mod 365)/30))*30),"00") AS MyDays
FROM tblAPPLICATIONS
WHERE (((tblAPPLICATIONS.[DATE OF DECISION])>=DateAdd("yyyy",-1,Date())+1))
GROUP BY tblAPPLICATIONS.SPECIALIST, tblAPPLICATIONS.REPORTS;
I have one report, TIME AGING, that I just want to know a how many TIME AGING records there are
(1) for the month the report is run
(2) for the reporting period for the SPECIALIST which the report is run.
Can anyone help?
Thanks
SELECT tblAPPLICATIONS.SPECIALIST, tblAPPLICATIONS.REPORTS, Avg(DateDiff("d",[DATE RECEIVED],[DATE OF DECISION])) AS DAYS, dateadd("yyyy",-1,dateadd("m",1,date())-day(dateadd("m",1,date()))+1) & " - " & dateadd("m",1,date())-day(dateadd("m",1,date())) AS [REPORT PERIOD], Format(Int([Days]/365),"00-") & Format(Int((([Days] Mod 365)/30)),"00-") & Format(([Days]-(Int([Days]/365)*365+Int(([Days] Mod 365)/30))*30),"00") AS MyDays
FROM tblAPPLICATIONS
WHERE (((tblAPPLICATIONS.[DATE OF DECISION])>=DateAdd("yyyy",-1,Date())+1))
GROUP BY tblAPPLICATIONS.SPECIALIST, tblAPPLICATIONS.REPORTS;
I have one report, TIME AGING, that I just want to know a how many TIME AGING records there are
(1) for the month the report is run
(2) for the reporting period for the SPECIALIST which the report is run.
Can anyone help?
Thanks