Hi everyone
I wonder if someone can help me with an IIF function in a query.
I'm calculating the NoOfDays field. This field only apperars in the query and is currently calculated by the following:-
NoOfDays: DateDiff("d",[InvoiceDate],[CurrentDate])
I type this into a field box in the query design page.
This works fine for now, however I now need the NoOfDays field to display a 0 if the Paid field has a Y in it, otherwise I still want the previous calculation to apply. I've tried playing with the IIF function which I think should do it but I think it's where to put brackets and inverted commas that is letting me down.
I wonder if someone can help me with an IIF function in a query.
I'm calculating the NoOfDays field. This field only apperars in the query and is currently calculated by the following:-
NoOfDays: DateDiff("d",[InvoiceDate],[CurrentDate])
I type this into a field box in the query design page.
This works fine for now, however I now need the NoOfDays field to display a 0 if the Paid field has a Y in it, otherwise I still want the previous calculation to apply. I've tried playing with the IIF function which I think should do it but I think it's where to put brackets and inverted commas that is letting me down.