Results 1 to 2 of 2
  1. #1
    SpdRacerX is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    40

    Expression Help Please

    I want to return a Yes/No for anything greater than 24 hours. Is this possible? If so how would I write it?

    I have the following Expression in a query:

    Over: IIf([Total Time]>"23:59","Yes","No")

    Total Time: DateDiff("n",[Present],[Discharge])\60 & Format(DateDiff("n",[Present],[Discharge]) Mod 60,"\:00")

    Am I doing something wrong? I found Errors in the [Over] Expression. For instance it reads "Yes" for a Record that is returned as 8 hours and 20 minutes. The [Total Time] works great I just can't figure out the [Over] Expression.

  2. #2
    SpdRacerX is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    40
    Solved.

    Made a separate expression to read:

    Over Formula: (DateDiff("n",[Present],[Discharge]))/60

    Then changed Over expression to read:

    Over: IIf([Over Formula]>24,"Yes","No")

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 01-05-2012, 05:10 PM
  2. Expression Help
    By bboyd in forum Access
    Replies: 3
    Last Post: 11-25-2011, 06:11 AM
  3. Looking for help with an expression
    By CoachBarker in forum Queries
    Replies: 3
    Last Post: 11-25-2010, 05:17 AM
  4. Expression value
    By KWarzala in forum Reports
    Replies: 0
    Last Post: 06-15-2010, 12:35 PM
  5. Help With an expression
    By kylem4711 in forum Queries
    Replies: 2
    Last Post: 04-23-2009, 01:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums