D
depawl
I am trying to design a query that will return "overdue" report dates
from 2 different fields. The code I'm using goes like this:
SELECT IIf([REPORT1]<Now(),[REPORT1],Null) AS Report1OverDue,
IIf([REPORT2]<Now(),[REPORT2],Null) AS Report2OverDue
FROM MyTable
WHERE (IsNull([REPORT1RECEIVED]) Or IsNull(REPORT2RECEIVED]));
What I wish this code did is to return any REPORT1 overdue dates (unless
REPORT1RECEIVED is true) or any REPORT2 overdue dates (unless
REPORT2RECEIVED is true).
But what is does is return all REPORT1 dates (overdue or not) for
REPORT2 overdue dates.
I don't seem to be able to limit it to just overdue dates for both reports.
Thanks.
from 2 different fields. The code I'm using goes like this:
SELECT IIf([REPORT1]<Now(),[REPORT1],Null) AS Report1OverDue,
IIf([REPORT2]<Now(),[REPORT2],Null) AS Report2OverDue
FROM MyTable
WHERE (IsNull([REPORT1RECEIVED]) Or IsNull(REPORT2RECEIVED]));
What I wish this code did is to return any REPORT1 overdue dates (unless
REPORT1RECEIVED is true) or any REPORT2 overdue dates (unless
REPORT2RECEIVED is true).
But what is does is return all REPORT1 dates (overdue or not) for
REPORT2 overdue dates.
I don't seem to be able to limit it to just overdue dates for both reports.
Thanks.