the situation you described would call for multiple, nested IIf() functions,
which would not dynamically adjust to any change you made in the combobox
list of values - which is why i basically ignored your question in favor of
a solution that would better fit the situation and require no programming
maintenance.
but to answer your actual question...

nested IIf functions follow a simple enough logic, but you have to think
through the logic very carefully. consider that the basic "English" for an
IIf function is
If this is true, then do that, otherwise do something else.
try looking at it as a hierarchy of actions, as
If this is true
then do that
otherwise do something else.
so you have to decide what you want to happen when "this" is true. if you
need to choose between two things, then you'd nest another IIf function, as
If this is true
then if this is true
then do that
otherwise do something else
otherwise do something else
the actual syntax would be
IIf(This = True, IIf(This = True, X, Y), Z)
or perhaps if this is true then you want one thing to happen, otherwise you
want to choose between two other actions, as
If this is true
then do that
otherwise if this is true
then do that
otherwise do something else
here, the actual syntax would be
IIf(This = True, X, IIf(This = True, Y, Z))
you can write multiple nesting levels in IIf functions, but i think the
above examples are enough to give you the basic idea. in reality, nested IIf
functions can become very complex and difficult to write and debug.
depending on what you're doing, the Choose function or the Switch function
might be a better choice - you can read up on those functions in Access
Help. i find it much easier to write nested If statements in VBA code, or
use the Select Case statement in VBA code, to handle complex operations that
are dependent on a runtime value.
hth
by
one, so
it's and
Z<10