I have been trying to figure out how to combine criteria/expression without creating another query. I was wondering if this can be done. I need to see all records (open and closed) for the current and previous year as well as records for other years that are null in the Date Closed field.
I have created a field (YEAR)from my Date Opened and set the criteria asking for records for the current year and the previous year. This all works fine. I am having problems with the null records in the Date closed field. Below is my SQL.
SELECT Table1.ID, Year([Date Opened]) AS [Year], Table1.[Date Opened], Table1.[Date Closed], Table1.PIN, Table1.Department, Table1.System, Table1.LOB, Table1.Responsible, Table1.[PID #], Table1.[BCR #], Table1.[MA Inquiry #], Table1.Issue, Table1.Activity, Table1.Resolution, Table1.[Control Plan], Table1.[Provider Type], Table1.Source, Table1.Product, Table1.[Procedure/HCPCS], Table1.TOS, Table1.POS, Table1.Modifiers, Table1.RevCode, Table1.[NP Code], Table1.Group, Table1.Recovery, Table1.Other, Table1.[Recv No], Table1.[Process Key], Table1.ErrId, Table1.Workaround, Table1.DocICN, Table1.DOS, Table1.ContractNum
FROM Table1
WHERE (((Year([Date Opened])) Between Year(Date())-1 And Year(Date())))
ORDER BY Table1.ID DESC;
I have created a field (YEAR)from my Date Opened and set the criteria asking for records for the current year and the previous year. This all works fine. I am having problems with the null records in the Date closed field. Below is my SQL.
SELECT Table1.ID, Year([Date Opened]) AS [Year], Table1.[Date Opened], Table1.[Date Closed], Table1.PIN, Table1.Department, Table1.System, Table1.LOB, Table1.Responsible, Table1.[PID #], Table1.[BCR #], Table1.[MA Inquiry #], Table1.Issue, Table1.Activity, Table1.Resolution, Table1.[Control Plan], Table1.[Provider Type], Table1.Source, Table1.Product, Table1.[Procedure/HCPCS], Table1.TOS, Table1.POS, Table1.Modifiers, Table1.RevCode, Table1.[NP Code], Table1.Group, Table1.Recovery, Table1.Other, Table1.[Recv No], Table1.[Process Key], Table1.ErrId, Table1.Workaround, Table1.DocICN, Table1.DOS, Table1.ContractNum
FROM Table1
WHERE (((Year([Date Opened])) Between Year(Date())-1 And Year(Date())))
ORDER BY Table1.ID DESC;