About IIf statement

dealwi8me

Registered User.
Local time
Today, 04:13
Joined
Jan 5, 2005
Messages
187
I have an update query and i want to have this:

if something<>NULL
F1= "T"
else
if something1 <> NULL
F1="X"
else
F1="XT"
end if
end if

At the update query i have Field:F1 and Update to:IIf(TABLE1!something Is Not Null;"T";IIf(TABLE1!something1 Is Not Null;"X";"XT"))

but it never gets the XT value...

what am i doing wrong?

Thank you!
 
This formula is working for me:
IIf(TABLE1!something Is Not Null;"T";IIf(TABLE1!something1 Is Not Null;"X";"XT"))


If you use a Form for criteria You must refresh forms data.
 
:cool: Hello dealwi!
Look at DemoIIfA97,
Look at Table1, Query1, try Query1.
(MStef alias Štef)
 

Attachments

Thank you guyz!

I finally made it work!
The problem wasn't to the iff syntax but to iff logic :)
 

Users who are viewing this thread

Back
Top Bottom