Results 1 to 4 of 4
  1. #1
    1Christmas2 is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2012
    Posts
    6

    Summing DateDiff Fields

    I have three calculated fields using the DateDiff formula named [DateDiff1], [DateDiff2], [DateDiff3] and I have a fourth calculated field that sums up the three DateDiff fields named [Total]. The total field works fine when all three DateDiff fields have data but when any one of the three DateDiff fields is blank then the Total field also returns a blank. How can I make the [Total] field return a result even if one or more of the DateDiff fields are blank?

    Thanks,


    Chris

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    I would approach it using VBA. I suppose an IIf statement would work too.

    Are your controls on a form or a report? If it is a report, where in the report? Is it in a footer, header, detail?

  3. #3
    1Christmas2 is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2012
    Posts
    6
    Your IIf statement idea worked! Thank you!

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Thanks for the update!

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

Similar Threads

  1. Summing fields in Access 2010 reports
    By bannonymous in forum Reports
    Replies: 5
    Last Post: 07-16-2013, 05:12 PM
  2. Summing Fields between tables
    By marrone12 in forum Queries
    Replies: 9
    Last Post: 09-16-2011, 12:37 PM
  3. Summing fields, maby little strange question
    By sina00 in forum Programming
    Replies: 3
    Last Post: 07-25-2011, 08:45 AM
  4. Summing Calculated Fields
    By Zoran in forum Queries
    Replies: 1
    Last Post: 03-31-2010, 01:59 PM
  5. Replies: 0
    Last Post: 01-24-2009, 11:40 AM

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