Calculate the Overdue date in Access

Fields in a table:

Date Requeted
Target Date
Completed date

Date Requested: 4/15/09
Target Date: 4/15/09
Completed Date: 4/15/09

Status: Completed
Todays date : 4/28/09

When I apply the formula below... I get get OVERDUE is that right???????, bit confused

=IIf([Status]<>"Completed" And Int([Target Date])<Int(Date()),"Overdue")

Open in new window

Who is Participating?
Im confused, your code
=IIf([Status]<>"Completed" And Int([Target Date])<Int(Date()),"Overdue")

has the Value.   Overdue        if the two conditions are met.
But it has no default value if they are not. So what changes it back to something other than OVERDUE
when the next value doesnt meet the critera.  It's like its half of the formula
should be something like

=IIf([Status]<>"Completed And Int([Target Date])<Int(Date()),"Overdue", "Pending") ???

Maybe, is that doesn't work let us know.
I will try it on my end also.

mercybthomas74Author Commented:
the status shows complete , how can that be overdue?
I tried it and it seemed to work. Make sure in your table the status is spelled right and there is no space in front of the first character. If it still doesn't work, check the system clock to make sure Date() is showing today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.