Results 1 to 2 of 2
  1. #1
    rjwell is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    1

    Creating a Calculated Field Using IIF or NZ

    Hello,

    I'm working on a query used for a report that tracks a calculated field I'm calling "Aged Holds" of which I'm looking for production holds older than 7 days. To create this calculated field I need to use 3 other fields; hold date, release date, and reject date. Hold date will always have a value and is never null but release date and reject date will be null when the other is not or both null at the same time if production holds are still active. To create my calculated field I need to subtract the hold date from either release date or reject date when they are not null values. I've used the NZ function with release date and hold date to create the calculated field with but how do I incorporate reject date?



    This is what I currently have using:
    Hold_Age: nz([RELEASE_DATE],Date())-[HOLD_DATE]

  2. #2
    Rhino373 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    65
    Something like this:

    =IIF([Release_Date] is null, IIF([Reject_Date] is null,Date() - [Hold_Date],[Reject_Date] - [Hold_Date],[Release_Date] - [Hold Date])

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

Similar Threads

  1. calculated field
    By nashr1928 in forum Forms
    Replies: 2
    Last Post: 03-30-2011, 04:29 PM
  2. creating a calculated column
    By bold01 in forum Access
    Replies: 13
    Last Post: 02-10-2011, 08:17 AM
  3. calculated field from calculated field?
    By RedGoneWILD in forum Reports
    Replies: 5
    Last Post: 08-03-2010, 02:32 PM
  4. Calculated field
    By nashr1928 in forum Forms
    Replies: 9
    Last Post: 08-01-2010, 01:59 PM
  5. Calculated field
    By nashr1928 in forum Forms
    Replies: 3
    Last Post: 07-22-2010, 05:10 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