Hi I'm trying to summarize the aging of debtors , now below are important fields which i'm using:
- CDate ( Represent the invoice post date)
- Date () ( Represent the cut off date)
- Debit ( Invoice value or receipts reversal)
- Credit (Receipts & sales returns)
Below is the code I'm using in the Expression builder of the report, by the way I have controls on the page footer as follow:
- 30 Days 60 days 90 days 120 days
Code: IIF(DateDiff( Cdate,Date()) Between 1 and 30,Sum(([Debit]-[Credit])),Null)
but it is giving me an error ,where I'm going wrong ? this is a sure way of ageing a customer statement without disturbing the detailed report.
Regards
Chris
IIF(
DateDiff( "d" , DATEVALUE(Cdate), DATEVALUE(Date()) ) >= 1 and DateDiff("d", DATEVALUE(Cdate), DATEVALUE(Date()) ) <= 30,
Sum(([Debit]-[Credit])),Nu
read more about the datediff from - https://www.techonthenet.com/access/functions/date/datediff.php