Proper Syntax Required

  • Thread starter Thread starter TeeSee
  • Start date Start date
T

TeeSee

My form is populated by a query. In the query there are two calculated
fields -- NetCost and NeNetCost. The following IIF's are in text
boxes. The first one with the string responses works as expected so
the logic seems to be okay but I keep getting #Name? error in the text
box of the second one. Could someone please explain what my issue is.
Thanks

=IIf(IsNull([NewNetCost]),("It is Null"),("HasValue")) ****** This is
just a test scenario *******

=IIf(IsNull([NewNetCost]),[NetCost],[NewNetCost])
 
My form is populated by a query. In the query there are two calculated
fields -- NetCost and NeNetCost. The following IIF's are in text
boxes. The first one with the string responses works as expected so
the logic seems to be okay but I keep getting #Name? error in the text
box of the second one. Could someone please explain what my issue is.
Thanks

=IIf(IsNull([NewNetCost]),("It is Null"),("HasValue")) ****** This is
just a test scenario *******

=IIf(IsNull([NewNetCost]),[NetCost],[NewNetCost])

1) Make sure the name of this control is not "NetCost".

2) Access throws a #Name error when it cannot identify a field used in
it's control source expression.
As [NetCost] is the only field used in this expression that is not
also in the first expression, I would suspect that there is a
difference in spelling between the query field [NetCost] and the field
name used in the expression.

3) You somehow unchecked the [NetCost] column's show checkbox in the
query and therefore the [NetCost] field is not available in the form's
recordsource.
 
My form is populated by a query. In the query there are two calculated
fields -- NetCost and NeNetCost. The following IIF's are in text
boxes. The first one with the string responses works as expected so
the logic seems to be okay but I keep getting #Name? error in the text
box of the second one. Could someone please explain what my issue is.
Thanks
=IIf(IsNull([NewNetCost]),("It is Null"),("HasValue")) ****** This is
just a test scenario *******
=IIf(IsNull([NewNetCost]),[NetCost],[NewNetCost])

1) Make sure the name of this control is not "NetCost".

2) Access throws a #Name error when it cannot identify a field used in
it's control source expression.
As [NetCost] is the only field used in this expression that is not
also in the first expression, I would suspect that there is a
difference in spelling between the query field [NetCost] and the field
name used in the expression.

3) You somehow unchecked the [NetCost] column's show checkbox in the
query and therefore the [NetCost] field is not available in the form's
recordsource.

Thanks Fred .....
1) Make sure the name of this control is not "NetCost".
It WAS!
 
Back
Top