Count Overdue Items?

phn

Registered User.
Local time
Today, 10:43
Joined
Mar 17, 2006
Messages
21
I have a database for booking items in and out and would like the database to automatically count the number of items that are overdue.

I have a COMPLETED field which is a check box, when ticked completes the booking, if it is not ticked then the booking is incomplete.

I also have the "Date Returned" which is the date the customer is supposed to return the items.

So using these two fields how can I count the number of overdue items?

if COMPLETED=false and Date Returned<Date() +1

that's basically the logical expression I think would work, but I don't know the code/method to implement this into my database :x please help!
 
I figured it out, the solution was much easier than I had first anticipated.

I created a query based on another query which filtered out the completed bookings, I then set the criteria of the new query to <Date() of "DateReturned" field to list the bookings which were incomplete, but had passed the current date.

I then used the DCount function to count the number of data that appeared in this field.

I hope this helps other people :) !
 
You can combine both criteria in the same query. Make sure they are on the same line in the criteria grid. But if you wanted to use DCount() you don't need the query. DCount() supports criteria itself.
 

Users who are viewing this thread

Back
Top Bottom