Nested IIf expression

T

tbrown

I have a nest of 4 IIf statements that keeps bringing up the error message
"The expression you entered has a function containing the wrong number of
arguments" Below is my statement, please help:

Expr14ddd: IIf( ([EP]![Quote: Effective Date] Between #01/01/89# And
#12/31/89#) And ([EP]![Quote: Expiration Date] Between #01/01/89# And
#12/31/89#),( [EP]![Quote: Expiration Date] - [EP]![Quote: Effective Date]
)* [EP]![Expr13] ,
IIf( ([EP]![Quote: Effective Date] < #01/01/89#) And ([EP]![Quote:
Expiration Date] Between #01/01/89# And #12/31/89#),( [EP]![Quote:
Expiration Date] -#01/01/89#)* [EP]![Expr13] ,
IIf(([EP]![Quote: Effective Date] Between #01/01/89# And #12/31/89#) And
([EP]![Quote: Expiration Date] > #12/31/89#),(#12/31/89#- [EP]![Quote:
Effective Date] )* [EP]![Expr13] ),
IIf(([EP]![Quote: Effective Date] < #01/01/89#) And ([EP]![Quote:
Expiration Date] > #12/31/89#),(#12/31/89#-#01/01/89#)* [EP]![Expr13] ,0))))
 
B

Bryan in Bakersfield

It looks like you have a stray right parenthesis { ) } in your third IIF -

IIf(([EP]![Quote: Effective Date] Between #01/01/89# And #12/31/89#) And
([EP]![Quote: Expiration Date] > #12/31/89#),(#12/31/89#- [EP]![Quote:
Effective Date] )* [EP]![Expr13] ), <-- here

HTH
Bryan


tbrown said:
I have a nest of 4 IIf statements that keeps bringing up the error message
"The expression you entered has a function containing the wrong number of
arguments" Below is my statement, please help:

Expr14ddd: IIf( ([EP]![Quote: Effective Date] Between #01/01/89# And
#12/31/89#) And ([EP]![Quote: Expiration Date] Between #01/01/89# And
#12/31/89#),( [EP]![Quote: Expiration Date] - [EP]![Quote: Effective Date]
)* [EP]![Expr13] ,
IIf( ([EP]![Quote: Effective Date] < #01/01/89#) And ([EP]![Quote:
Expiration Date] Between #01/01/89# And #12/31/89#),( [EP]![Quote:
Expiration Date] -#01/01/89#)* [EP]![Expr13] ,
IIf(([EP]![Quote: Effective Date] Between #01/01/89# And #12/31/89#) And
([EP]![Quote: Expiration Date] > #12/31/89#),(#12/31/89#- [EP]![Quote:
Effective Date] )* [EP]![Expr13] ),
IIf(([EP]![Quote: Effective Date] < #01/01/89#) And ([EP]![Quote:
Expiration Date] > #12/31/89#),(#12/31/89#-#01/01/89#)* [EP]![Expr13] ,0))))
 

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

Top