Hidding #Error on form cell

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

I have a form that displays the results of a date add

=Format(DateAdd("d",[days_till_close],[date_refer_close]),"dddd"",
""mmm d yyyy")

However if the date_refer_close is not populated it of course returns
#error. How can I hide value? I would like to lock this text box and
show a blank if the value is #error.
 
Rich said:
I have a form that displays the results of a date add

=Format(DateAdd("d",[days_till_close],[date_refer_close]),"dddd"",
""mmm d yyyy")

However if the date_refer_close is not populated it of course returns
#error. How can I hide value? I would like to lock this text box and
show a blank if the value is #error.


How about not generating the error if the field is null?

=IIf([date_refer_close] Is Null, "", Format( . . . ))

Since the text box's control source is an expression, it
will not be editable, so locking it is unnecessary.
 
Back
Top