Frank said:
Thanks for assistance. However, the problem still persist. Each time I run
the query, it does not populate null values with ------, it just returns all
"Non Null" values. I do not have a non null value on the phonenumber field.
In fact, I created a new query with just the phonenumber field and put the
same iif clause statement on it. The results were the same. Wonder why it
won't work?
I have a query that reflects a field named phonenumber on the main tale. I
want to replace all null values with "-----". my iif clause is as follows:
iif([phonenumber] is null, "----", [phonenumber]). When I run the query,
it returns all not null values. What am I doing wrong.
Maybe the phone field in the table is a Text field with its
AllowZeroLength property set to Yes? If so, the field is
probably equal to "" instead of being Null.
Unless you have a very good reason for it, you probably
should set that property to No.
If you do have a good reason, you can check for both Null
and ZLS by using:
IIf(Nz(phonenumber, "")= "", "----", phonenumber)
OTOH, maybe you have users that enter one or more spaces
when they don't know the phone number.
If I'm barking up the wrong tree, please post a COPY/PASTE
of your query's SQL view and provide details about the
phonenumber field.