Expression

  • Thread starter Thread starter Dmac
  • Start date Start date
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.
 
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.
 
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)
 

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