complex IIF statement

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!
 
S

SteveS

_ 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]))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Business Days 4
dhCountWorkdaysA help 2
Joining IIF statements together 2
Query on or before date 2
IIf statement in Access 2003 query 9
Statement no working 2
iif statement 4
IIf function to calculate field 4

Top