J
JL
Where and how are you using them?
If you are using them in a form, IIF is like a function
that returns a value. Therefore, you have to assign them
to a variable or something similar.
For example,
Val1 = iif((([Text1]-11) >= [StartDate]) and (([Text1]-11)=
[Enddate])), [approved]+2, 0)
Another way to rewrite IIF is to use IF and ELSE.
For example,
if ([Text1]-11) >= [StartDate]) and _
([Text1]-11)=[Enddate]) then
Val1 = [approved]+2
else
Val1 = 0
end if
PS: There still might be problems if the [Text1] and
[StartDate] are different type.
If you are using them in a form, IIF is like a function
that returns a value. Therefore, you have to assign them
to a variable or something similar.
For example,
Val1 = iif((([Text1]-11) >= [StartDate]) and (([Text1]-11)=
[Enddate])), [approved]+2, 0)
Another way to rewrite IIF is to use IF and ELSE.
For example,
if ([Text1]-11) >= [StartDate]) and _
([Text1]-11)=[Enddate]) then
Val1 = [approved]+2
else
Val1 = 0
end if
PS: There still might be problems if the [Text1] and
[StartDate] are different type.