G
Guest
Simple but I can't get it:
if [fielda]is null or equal to zero, then [fieldb], otherwise [fielda]
if [fielda]is null or equal to zero, then [fieldb], otherwise [fielda]
Gina Whipp said:SierraLightFoot,
Is the below what you are looking for?
If(IsNull([fielda]) Or [fielda]=0,[fieldb],[fielda])
OR in a query
NameOfField: IIf(IsNull([fielda]) Or [fielda]=0,[fieldb],[fielda])
HTH,
Gina Whipp
sierralightfoot said:Simple but I can't get it:
if [fielda]is null or equal to zero, then [fieldb], otherwise [fielda]
sierralightfoot said:I am using this expresion: NameOfField: IIf(IsNull([fielda]) Or
[fielda]=0,[fieldb],[fielda])
but where field is =0 I get "error' as return.
Gina Whipp said:SierraLightFoot,
Is the below what you are looking for?
If(IsNull([fielda]) Or [fielda]=0,[fieldb],[fielda])
OR in a query
NameOfField: IIf(IsNull([fielda]) Or [fielda]=0,[fieldb],[fielda])
HTH,
Gina Whipp
sierralightfoot said:Simple but I can't get it:
if [fielda]is null or equal to zero, then [fieldb], otherwise [fielda]
sierralightfoot said:Looks right, but what is the differance in if vs iif
sierralightfoot said:Simple but I can't get it:
if [fielda]is null or equal to zero, then [fieldb], otherwise [fielda]
sierralightfoot said:Looks right, but what is the differance in if vs iif ?
thanks
sierralightfoot said:Looks right, but what is the differance in if vs iif
sierralightfoot said:Simple but I can't get it:
if [fielda]is null or equal to zero, then [fieldb], otherwise [fielda]
Gina Whipp said:SierraLightFoot,
Going to need one of those MVP's to explain that... All I can tell you
that 'IIf' evaluates (Expression, TruePart, FalsePart) and will only
return True or False. 'If' allows conditional excecution, based on the
evaluation of the expression (such as, if... then... else).
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" - Tremors
II
sierralightfoot said:Looks right, but what is the differance in if vs iif ?
thanks
sierralightfoot said:Looks right, but what is the differance in if vs iif
:
Simple but I can't get it:
if [fielda]is null or equal to zero, then [fieldb], otherwise [fielda]
Gina said:SierraLightFoot,
Going to need one of those MVP's to explain that... All I can tell you that
'IIf' evaluates (Expression, TruePart, FalsePart) and will only return True
or False. 'If' allows conditional excecution, based on the evaluation of
the expression (such as, if... then... else).
David F Cox said:While we wait for an MVP, IIF (arg1, arg2, arg3) is an inbuilt function
which returns a variant value.
"If" is a language element.
Gina Whipp said:SierraLightFoot,
Going to need one of those MVP's to explain that... All I can tell you
that 'IIf' evaluates (Expression, TruePart, FalsePart) and will only
return True or False. 'If' allows conditional excecution, based on the
evaluation of the expression (such as, if... then... else).
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors II
sierralightfoot said:Looks right, but what is the differance in if vs iif ?
thanks
:
Looks right, but what is the differance in if vs iif
:
Simple but I can't get it:
if [fielda]is null or equal to zero, then [fieldb], otherwise
[fielda]