complex IIF statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Query that has the following fields: Awaiting Signature (Yes/No),
Date Recieved, Date Completed. I then need help building an If Statement. I
have a basic one but it doesn't do all that I need. Here is what I have so
far:

Days Elapsed: IIf([Awaiting Signature]=No,dhCountWorkdaysA([Date
Received],Date()),(dhCountWorkdaysA([Date Received],[Date
Completed/Implemented])))

What I need is this: I need that statement above but also another condition
within that - would read something like

IIf([Awaiting Signature]=No***or Awaiting Signature=Yes and Date
Completed/Implemented=Is Null***,dhCountWorkdaysA([Date
Received],Date()),(dhCountWorkdaysA([Date Received],[Date
Completed/Implemented])

between *** is what I am trying to get to work but doesn't!
Confused..Thanks in advance!
 
_ said:
I have a Query that has the following fields: Awaiting Signature (Yes/No),
Date Recieved, Date Completed. I then need help building an If Statement. I
have a basic one but it doesn't do all that I need. Here is what I have so
far:

Days Elapsed: IIf([Awaiting Signature]=No,dhCountWorkdaysA([Date
Received],Date()),(dhCountWorkdaysA([Date Received],[Date
Completed/Implemented])))

What I need is this: I need that statement above but also another condition
within that - would read something like

IIf([Awaiting Signature]=No***or Awaiting Signature=Yes and Date
Completed/Implemented=Is Null***,dhCountWorkdaysA([Date
Received],Date()),(dhCountWorkdaysA([Date Received],[Date
Completed/Implemented])

between *** is what I am trying to get to work but doesn't!
Confused..Thanks in advance!


Try this:

IIf([Awaiting Signature]=No Or ([Awaiting Signature]=Yes And
IsNull([Date Completed/Implemented])),dhCountWorkdaysA([Date
Received],Date()),dhCountWorkdaysA([Date Received],[Date
Completed/Implemented]))
 
Back
Top