I have written a report to age our Accounts Payables but I can not seem to get anything to fill past the current bucket. This is the code below:



SELECT [All invoices].VE_CD, [All invoices].FACT_CD, [All invoices].IVC_CD, [All invoices].IVC_DT, [All invoices].DISC_DT,
IIf([ivc_dt] Between ([ivc_dt]-30) And [ivc_dt],[amt],0) AS [Current Due], IIf([ivc_dt] Between ([ivc_dt]-60) And [ivc_dt]-31,[amt],0) AS [31/60], IIf([ivc_dt] Between ([ivc_dt]-90) And [ivc_dt]-61,[amt],0) AS [61/90], IIf([ivc_dt] Between ([ivc_dt]-150) And [ivc_dt]-91,[amt],0) AS [Over 90] INTO [Invoice Aging Report]
FROM [All invoices];

Even past due amounts are showing in the current bucket.