Calculate the Overdue date in Access

Posted on 2009-04-28
Last Modified: 2012-05-06
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

Question by:mercybthomas74
    LVL 5

    Expert Comment

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


    Author Comment

    the status shows complete , how can that be overdue?
    LVL 22

    Expert Comment

    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.

    LVL 6

    Accepted Solution

    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") ???


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now