By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,145 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

IIF statement in query field name expression builder

P: n/a
I'm trying to get a query in access to give me a parsed string if the
field contents are not null and the value from another field if the
field contents are null. I have the following in the expression
builder:

ADID: iff([User Logon Name]<>"",
(Left$([User Logon Name],InStr(1,[User Logon Name],"@")-1)),
([Pre-Windows 2000 Logon Name]))

I keep getting the error "undefined function 'iff' in expression"

It's been a looooooong time since i've dealt with Access...please take
pity on me!!

Thanks,
Shelley

Aug 3 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
ADID: iff([User Logon Name]<>"",
(Left$([User Logon Name],InStr(1,[User Logon Name],"@")-1)),
([Pre-Windows 2000 Logon Name]))
It's IIF, not IFF... try that and you should be good to go.

Aug 3 '06 #2

P: n/a
On 3 Aug 2006 12:51:00 -0700, sbowman wrote:
I'm trying to get a query in access to give me a parsed string if the
field contents are not null and the value from another field if the
field contents are null. I have the following in the expression
builder:

ADID: iff([User Logon Name]<>"",
(Left$([User Logon Name],InStr(1,[User Logon Name],"@")-1)),
([Pre-Windows 2000 Logon Name]))

I keep getting the error "undefined function 'iff' in expression"

It's been a looooooong time since i've dealt with Access...please take
pity on me!!

Thanks,
Shelley
The function is IIF (not IFF).

Also, there is a difference between Null and "".

ADID:IIf(Not IsNull([User Logon Name]),Left([User Logon
Name],InStr(1,[User Logon Name],"@")-1),
[Pre-Windows 2000 Logon Name])
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Aug 3 '06 #3

P: n/a
fredg <fg******@example.invalidwrote in
news:13******************************@40tude.net:
The function is IIF (not IFF).
The reason for that is that it stands for Immediate If.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Aug 3 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.