• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

IIf Alias

Hello,
I have a bunch of fields that are requiring "N/A" if the end user hasn't entered any data.  The code I'm using for the source is as follows.
=IIf([Close Date]<=0,"N/A",[Close Date])

Now, this works for numbers but not for text entries.  How can I edit this code to work for text entries?
0
napsternova
Asked:
napsternova
  • 2
1 Solution
 
Dale FyeCommented:
Try the NZ() function.

=NZ([Close Date], "N/A")

This will work if no data has ever been entered, but if data was entered, saved, and then deleted, it probably won't.  In that case, you might try:

= IIF(LEN([Close Date] & "") = 0, "N/A", [Close Date])
0
 
Rey Obrero (Capricorn1)Commented:
first, you have to set the Data type of the field to Text, if it is not set as Text.
0
 
napsternovaDeveloperAuthor Commented:
Easy as pie.  Thank you soooo much!
0
 
Dale FyeCommented:
your welcome
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now