From: IR on
I've written the following statement and I'm getting the following error, the
expression you entered has a function containing the wrong number of
arguments.

Iif([select]=1,"show",(iif(isnull([select]=true, (iif([HMO]=1, "show",(iif
(isnull([HMO]=true,"show","dont show"))
From: Daryl S on
IR -

IsNull takes only one argument, so it must have parentheses around the
argument. You do not need parentheses before the iif function. Try this:

Iif([select]=1,"show",iif(isnull([select])=true, iif([HMO]=1, "show",iif
(isnull([HMO])=true,"show","dont show"))))

--
Daryl S


"IR" wrote:

> I've written the following statement and I'm getting the following error, the
> expression you entered has a function containing the wrong number of
> arguments.
>
> Iif([select]=1,"show",(iif(isnull([select]=true, (iif([HMO]=1, "show",(iif
> (isnull([HMO]=true,"show","dont show"))
From: ghetto_banjo on
the iif function requires both an "if true value" and "if false
value".

your second iif function is missing one of these values (probably the
true value judging by the way you have this setup)


i assume that if [select] is null, you want "show". you could really
get this down to one iif statement using the OR operator:

iif([select] = 1 OR IsNull([select]) OR [HMO] = 1 OR IsNull([HMO]),
"show", "dont show")



just a side note, you dont need the =true part after the IsNull
function. also naming a field "select" is not a good practice (keyword
in SQL).