Nested Iif

  • Thread starter Thread starter Kirstie Adam
  • Start date Start date
K

Kirstie Adam

All,

I have been struggling with this one foe ages, and now i think i have looked
at it so long, i can't see what's what!

I have the following expression:

=Iif (([Work Type] = "Macro" Or "Full Upgrade") And ([Stage 3 Acq Fee Sent]
Is Not Null), 1750, Iif (([Work Type = "Permitted Upgrade") And (Stage 3 Acq
Fee Sent] Is Not Null), 750, 0)

but i can't get it to work. I know i have either too many brackets / not
enough brackets, but even when i get that right, it always gives me the
result 1750 when it should be giving 750.

I would really appreciate some help on this before i go mad!!

TIA,

Kirstie
 
Kristie,

Give this a shot:

=Iif ((([Work Type] = "Macro" Or [Work Type] = "Full Upgrade") And [Stage 3
Acq Fee Sent]
Is Not Null), 1750, Iif (([Work Type] = "Permitted Upgrade" And [Stage 3 Acq
Fee Sent] Is Not Null), 750, 0))

Hope this works for you,
Nikos
 
Nikos,

When i try that, it comes up as #Name?, and i don't know why. All the field
names etc are spelt correctly.
Any ideas?

Kirstie

Nikos Yannacopoulos said:
Kristie,

Give this a shot:

=Iif ((([Work Type] = "Macro" Or [Work Type] = "Full Upgrade") And [Stage 3
Acq Fee Sent]
Is Not Null), 1750, Iif (([Work Type] = "Permitted Upgrade" And [Stage 3 Acq
Fee Sent] Is Not Null), 750, 0))

Hope this works for you,
Nikos

Kirstie Adam said:
All,

I have been struggling with this one foe ages, and now i think i have looked
at it so long, i can't see what's what!

I have the following expression:

=Iif (([Work Type] = "Macro" Or "Full Upgrade") And ([Stage 3 Acq Fee Sent]
Is Not Null), 1750, Iif (([Work Type = "Permitted Upgrade") And (Stage 3 Acq
Fee Sent] Is Not Null), 750, 0)

but i can't get it to work. I know i have either too many brackets / not
enough brackets, but even when i get that right, it always gives me the
result 1750 when it should be giving 750.

I would really appreciate some help on this before i go mad!!

TIA,

Kirstie
 
Kirstie,

Can't put my finger on it, parentheses etc. are OK, I tested it, so the only
thing I can think of is word wrap in the post may have worked its miracle if
you copied and pasted. Zoom open and check. If no luck, you're welcome to
zip your db and mail it, if you want me to have a look.

Good luck,
Nikos

Kirstie Adam said:
Nikos,

When i try that, it comes up as #Name?, and i don't know why. All the field
names etc are spelt correctly.
Any ideas?

Kirstie

Nikos Yannacopoulos said:
Kristie,

Give this a shot:

=Iif ((([Work Type] = "Macro" Or [Work Type] = "Full Upgrade") And
[Stage
3
Acq Fee Sent]
Is Not Null), 1750, Iif (([Work Type] = "Permitted Upgrade" And [Stage 3 Acq
Fee Sent] Is Not Null), 750, 0))

Hope this works for you,
Nikos

Kirstie Adam said:
All,

I have been struggling with this one foe ages, and now i think i have looked
at it so long, i can't see what's what!

I have the following expression:

=Iif (([Work Type] = "Macro" Or "Full Upgrade") And ([Stage 3 Acq Fee Sent]
Is Not Null), 1750, Iif (([Work Type = "Permitted Upgrade") And (Stage
3
Acq
Fee Sent] Is Not Null), 750, 0)

but i can't get it to work. I know i have either too many brackets / not
enough brackets, but even when i get that right, it always gives me the
result 1750 when it should be giving 750.

I would really appreciate some help on this before i go mad!!

TIA,

Kirstie
 
Nikos,

It worked!
I retyped it manually, and it worked brilliantly. Thanks for all your help.

Kirstie


Nikos Yannacopoulos said:
Kirstie,

Can't put my finger on it, parentheses etc. are OK, I tested it, so the only
thing I can think of is word wrap in the post may have worked its miracle if
you copied and pasted. Zoom open and check. If no luck, you're welcome to
zip your db and mail it, if you want me to have a look.

Good luck,
Nikos

Kirstie Adam said:
Nikos,

When i try that, it comes up as #Name?, and i don't know why. All the field
names etc are spelt correctly.
Any ideas?

Kirstie

Nikos Yannacopoulos said:
Kristie,

Give this a shot:

=Iif ((([Work Type] = "Macro" Or [Work Type] = "Full Upgrade") And
[Stage
3
Acq Fee Sent]
Is Not Null), 1750, Iif (([Work Type] = "Permitted Upgrade" And [Stage
3
Acq
Fee Sent] Is Not Null), 750, 0))

Hope this works for you,
Nikos

All,

I have been struggling with this one foe ages, and now i think i have
looked
at it so long, i can't see what's what!

I have the following expression:

=Iif (([Work Type] = "Macro" Or "Full Upgrade") And ([Stage 3 Acq Fee
Sent]
Is Not Null), 1750, Iif (([Work Type = "Permitted Upgrade") And
(Stage
3
Acq
Fee Sent] Is Not Null), 750, 0)

but i can't get it to work. I know i have either too many brackets / not
enough brackets, but even when i get that right, it always gives me the
result 1750 when it should be giving 750.

I would really appreciate some help on this before i go mad!!

TIA,

Kirstie
 
Back
Top