I am working on a rental store database. I have MANAGE table like the following:
ItemNo Direction ClientName DateOfProcess
45------ OUT----John-------- 27/12/2010
34 ------IN------Green------- 5/1/2011
9 -------OUT----Howard----- 6/1/2011
45------ IN------John-------- 8/2/2011
45 ------OUT----Jim--------- 10/2/2011
and made a query to search for items that aren't returned to store for more than 1 month.
Criteria for Direction: "OUT"
Criteria for DateofProcess: Date()-[DateofProcess] > 30
'Assuming Date() returns 26/2/2011'
It's obvious from above table that item 9 is the target, but the query returns
45 Out John 27/12/2010
9 Out Howard 6/1/2011
without recognizing that item 45 has been rented again.
How can I make the query exclude this case? I can restructure the database if a
solution won't fit my structure
ItemNo Direction ClientName DateOfProcess
45------ OUT----John-------- 27/12/2010
34 ------IN------Green------- 5/1/2011
9 -------OUT----Howard----- 6/1/2011
45------ IN------John-------- 8/2/2011
45 ------OUT----Jim--------- 10/2/2011
and made a query to search for items that aren't returned to store for more than 1 month.
Criteria for Direction: "OUT"
Criteria for DateofProcess: Date()-[DateofProcess] > 30
'Assuming Date() returns 26/2/2011'
It's obvious from above table that item 9 is the target, but the query returns
45 Out John 27/12/2010
9 Out Howard 6/1/2011
without recognizing that item 45 has been rented again.
How can I make the query exclude this case? I can restructure the database if a
solution won't fit my structure