[AccessD] IIf with three fields

Steve Schapel steve at datamanagementsolutions.biz
Wed Mar 29 14:19:40 CDT 2017


Hi Kostas

You probably don't need to us the IIf function here.  Try this:

[phone_job]+", " & [phone_home]+", " & [mobile]

Regards
Steve


-----Original Message----- 
From: Kostas Konstantinidis 
Sent: Thursday, March 30, 2017 7:59 AM 
To: 'Access Developers discussion and problem solving' 
Subject: [AccessD] IIf with three fields 

Hi all,
I am a little confused about how to make IIf to work in query with three
different phones fields while all or any of them may be null

I use 

IIf([mobile] Is Null; [phone_home]; IIf([phone_home] Is Null; [phone_job];
IIf([phone_job] Is Null; 
[phone_home] & ", " & [mobile]; [phone_job] & ", " & [phone_home] & ", " &
", " & [mobile])))

But it doesn't work in all cases

Any help please?
Thank's
/kostas



More information about the AccessD mailing list