Results 1 to 3 of 3
  1. #1
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49

    Expression Builder - Function DateDiff

    Hello,



    I have this code: Due: DateDiff("d",Now(),[POSNextPerf]), it works good. I want to take it to the next level. In field POSNextPerf is there is no Date in their I want my formula to return 0. Currently it's blank or Null.

    Can this be done?

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Sure!

    Try:
    Code:
    Due: IIf(IsNull([PosNextPerf]),0,DateDiff("d",Now(),[POSNextPerf]))

  3. #3
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    Perfect that worked. Thank you soo much...

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

Similar Threads

  1. expression builder
    By frustratedwithaccess in forum Access
    Replies: 7
    Last Post: 11-12-2014, 09:15 AM
  2. iff function in expression builder
    By deso in forum Queries
    Replies: 4
    Last Post: 03-21-2013, 11:20 PM
  3. Replies: 2
    Last Post: 11-20-2012, 03:21 AM
  4. IIf Function for expression builder
    By Bertrand82 in forum Programming
    Replies: 3
    Last Post: 11-12-2012, 12:34 AM
  5. Building a Difficult DateDiff Expression
    By jma108 in forum Queries
    Replies: 0
    Last Post: 06-15-2009, 12:39 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