displaying text when value is null

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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?
 
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?
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top