Expression

D

Dmac

Hi group,

I need a little help please.

I have a report with a control [FireDrills1st]. I have the following
expression in the Control Source;
=IIf(IsNull([FireDrills1st]),"N/A",[FireDrills1st]). When the report is
generated, that field has #Error in it. I have also used the following
=IIf(IsNull([FireDrills1st]),"",[FireDrills1st]), but I still receive the
same error.

I don't understand why.

Can someone tell me what I am doing wrong, please.
 
R

Rick Brandt

Dmac said:
Hi group,

I need a little help please.

I have a report with a control [FireDrills1st]. I have the following
expression in the Control Source;
=IIf(IsNull([FireDrills1st]),"N/A",[FireDrills1st]). When the report
is generated, that field has #Error in it. I have also used the
following =IIf(IsNull([FireDrills1st]),"",[FireDrills1st]), but I
still receive the same error.

I don't understand why.

Can someone tell me what I am doing wrong, please.

A control with an expression in its ControlSource cannot be named the same as
any of the fields used in the expression.
 
V

Van T. Dinh

Make sure the name of the (TextBox) Control is different from the name of
the Field it is bound to.

Use the Field name in your IIf().

HTH
Van T. Dinh
MVP (Access)
 
Top