Calculate the Overdue date in Access

Fields in a table:

Date Requeted
Target Date
Completed date
Status

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

mercybthomas74Asked:
Who is Participating?
 
TonyStCommented:
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") ???




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

0
 
mercybthomas74Author Commented:
the status shows complete , how can that be overdue?
0
 
FlysterCommented:
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.

Flyster
0
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.