I have a summary report that is based on the primary data table. The report contains a number of fields that are filtered by a statement in their control source. I now need to add a second filter criteria to each statement, but I'm having trouble getting the correct results.
Each statement below needs to not only filter on the existing date criteria, it also needs to find records where NotifType=9.
STMT #1:
=Sum(Abs(Year([RecDate])=Year(Date())))
I changed it to this:
=Sum((Abs(Year([RecDate])=Year(Date()))) And ([NotifType]=9))
The correct result = 32, but the report shows -32. I assume I'm getting a negative number because of my parenthesis and have tried moving them around, but no luck.
These 2 statements also need to find records in the date range AND where NotifType=9.
STMT #2:
=Sum(Abs([RecDate] Between [Forms]![frmRptCriteria]![txtBeginDate] And [Forms]![frmRptCriteria]![txtEndDate]))
STMT #3:
=Sum(Abs([RecDate] Between ([Forms]![frmRptCriteria]![txtBeginDate]-365) And ([Forms]![frmRptCriteria]![txtEndDate]-365)))
Any help one of you code wizards can provide will be greatly appreciated.
Each statement below needs to not only filter on the existing date criteria, it also needs to find records where NotifType=9.
STMT #1:
=Sum(Abs(Year([RecDate])=Year(Date())))
I changed it to this:
=Sum((Abs(Year([RecDate])=Year(Date()))) And ([NotifType]=9))
The correct result = 32, but the report shows -32. I assume I'm getting a negative number because of my parenthesis and have tried moving them around, but no luck.
These 2 statements also need to find records in the date range AND where NotifType=9.
STMT #2:
=Sum(Abs([RecDate] Between [Forms]![frmRptCriteria]![txtBeginDate] And [Forms]![frmRptCriteria]![txtEndDate]))
STMT #3:
=Sum(Abs([RecDate] Between ([Forms]![frmRptCriteria]![txtBeginDate]-365) And ([Forms]![frmRptCriteria]![txtEndDate]-365)))
Any help one of you code wizards can provide will be greatly appreciated.