SELECT [Date calc].ID, [Date calc].Amount, [Date calc].Duedate, [Date calc].DatePaid, DateDiff("d",[Duedate],[DatePaid]) AS Days, IIf((DateDiff("d",[DueDate],[DatePaid])>4),[Amount]*3/1000) AS Expr1, IIf([Expr1]="Yes",[Amount]*3/1000) AS DtCr, IIf([Days]<"0","0","No") AS Expr2Switch you query to SQL view.
Copy and paste the SQL here.
We can show you the corrected SQL.
Then you can paste it over the SQL of your query.
Then switch back to query view and you will see how it is constructed by Access in the query designer.
FROM [Date calc];