473,434 Members | 1,503 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

IIF statement in query field name expression builder

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
3 17013
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bob | last post by:
Currently I am using this statement to translate 3 fields in my db thru Visual Basic. I import the data from one table to another then call the IFF statements and the NewDate to translate the...
3
by: Peter Phelps | last post by:
My problem is as follows: I need automatically iterate through a single field in a table and use the values in the field to create an in-statement. Currently, the character limitation in the...
7
by: mark | last post by:
Access 2000: I creating a report that has a record source built by the user who selects the WHERE values. An example is: SELECT * FROM CHARGELOG WHERE STDATE Between #10/27/2003# And...
0
by: JMCN | last post by:
hi- this function IDSpecialCases works great in access 97 in the query builder but why doesn't it work in access 2003? would does anyone have any wild guesses? is it a problem with the dao...
2
by: k7i5t3n | last post by:
I have two tables I'm using in a query. I have pulled several fields from 'tblEmployeeList' and need to pull a Yes/No field 'FileStampNumber' from the table 'tblFileStamps'. However, I need to...
2
by: Geoffrey KRETZ | last post by:
Hello, I'm wondering if the following behaviour is the correct one for PostGreSQL (7.4 on UNIX). I've a table temp_tab with 5 fields (f1,f2,f3,...),and I'm a launching the following request :...
4
by: Anja | last post by:
Hi everyone, I am trying to use the expression builder to create input to a control in an Access report. I have a table called Records and I want to select the minimum date for a record where...
22
by: Stan | last post by:
I am working with Access 2003 on a computer running XP. I am new at using Access. I have a Db with a date field stored as mm/dd/yyyy. I need a Query that will prompt for the month, ie. 6 for...
3
by: Thorben Grosser | last post by:
Hello Newsgroup, I am doing some archive database and therefore got one table indexing every folder and one table storing which rack belongs to which department, eg: table folders :...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.