displaying text when value is null

E

EmoryKA

I have a query that pulls information by [Loader]. Sometimes this field is
blank as the order has not been tasked to a loader. I want to display
"NONAME' in the field [Loader] if the field is blank.

I have tried IIF([Loader]="", "NONAME", [Loader])
and IIF([Loader] IS NULL, "NONAME", [Loader])

Neither seems to work. What am I doing wrong?
 
E

EmoryKA

This did not work. The formula is going in the criteria line on a query
under the field [Loader] I don't know if this makes a difference or not.

Rick B said:
Use the Nz function...

=Nz([Loader],"NO NAME")



--
Rick B



EmoryKA said:
I have a query that pulls information by [Loader]. Sometimes this field is
blank as the order has not been tasked to a loader. I want to display
"NONAME' in the field [Loader] if the field is blank.

I have tried IIF([Loader]="", "NONAME", [Loader])
and IIF([Loader] IS NULL, "NONAME", [Loader])

Neither seems to work. What am I doing wrong?
 
R

Rick B

Don't put it in the criteria.

You are not trying to limit records based on this.

You need to add a NEW column to your query and give the field a new name.
In the FIELD: 'cell' of a new column, put...

ModifiedLoader: Nz([Loader],"NO NAME")


In reports or forms based on this, you would have a new field available
called "modifiedloader". You can call it whatever you want.
--
Rick B



EmoryKA said:
This did not work. The formula is going in the criteria line on a query
under the field [Loader] I don't know if this makes a difference or not.

Rick B said:
Use the Nz function...

=Nz([Loader],"NO NAME")



--
Rick B



EmoryKA said:
I have a query that pulls information by [Loader]. Sometimes this
field
is
blank as the order has not been tasked to a loader. I want to display
"NONAME' in the field [Loader] if the field is blank.

I have tried IIF([Loader]="", "NONAME", [Loader])
and IIF([Loader] IS NULL, "NONAME", [Loader])

Neither seems to work. What am I doing wrong?
 
E

EmoryKA

Thank you.

Rick B said:
Don't put it in the criteria.

You are not trying to limit records based on this.

You need to add a NEW column to your query and give the field a new name.
In the FIELD: 'cell' of a new column, put...

ModifiedLoader: Nz([Loader],"NO NAME")


In reports or forms based on this, you would have a new field available
called "modifiedloader". You can call it whatever you want.
--
Rick B



EmoryKA said:
This did not work. The formula is going in the criteria line on a query
under the field [Loader] I don't know if this makes a difference or not.

Rick B said:
Use the Nz function...

=Nz([Loader],"NO NAME")



--
Rick B



I have a query that pulls information by [Loader]. Sometimes this field
is
blank as the order has not been tasked to a loader. I want to display
"NONAME' in the field [Loader] if the field is blank.

I have tried IIF([Loader]="", "NONAME", [Loader])
and IIF([Loader] IS NULL, "NONAME", [Loader])

Neither seems to work. What am I doing wrong?
 
Top