Anyways I got this so far: [Date Returned] Is Null And [Date Borrowed]>[Due Date]
This was close.
So you have a field that represents when the tool was borrowed and a calculated due date. Your Where clause will never return any records.
For example,
[Date Borrowed] = #8/1/2013# and
[Due Date] = #8/15/2013#
Substituting values
[Date Borrowed]>[Due Date]
#8/1/2013# > #8/15/2013#
You can see this will never be true.. ( I had to think about this for a while
) Presumably [Date Borrowed] would not be changed...
What about if we use
[Date Returned] Is Null And [Due Date] < Date()
If:
[Due Date] = #8/15/2013#
Date() = #9/11/2013#
Substituting:
[Due Date] < Date()
#8/15/2013# < #9/11/2013#
This IS true!!
You might try:
Code:
SELECT [Borrowed Log].[CD Borrowed], [Borrowed Log].Borrower, [Borrowed Log].[Date Borrowed]
FROM [Borrowed Log]
WHERE ([Date Returned] Is Null) And ([Due Date]<Date() );
<rant>
(
I REALLY hate spaces in object names)
</rant>
My $0.02......