if function error in a Querie

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The following is an if-function i am trying to get working but it doesnt
accept it and shows me if the cell [7_Evaluaciones_Auditoriias_cuentas]![11]
equals to 5 it gives in the cell for 'Ãndice máximo 1' an #Error-message
(instead of doing the calculation of 5*10) and if i put nothing (it should
put a zero) it calculates 5*10. I just don't understand, it doesnt do what it
should at all!

The if-Function: Ãndice máximo 1:
IIf([7_Evaluaciones_Auditoriias_cuentas]![11]="";0;5*10)

Please can someone help me with this as it seemed so simple but it just wont
do.
 
Try one of the following. The first will test for nulls and zero-length
strings. The second will test for nulls only, but it probably what you need
and will be faster.

IIf(Len([7_Evaluaciones_Auditoriias_cuentas].[11] & "")=0;0;5*10)

or

IIf([7_Evaluaciones_Auditoriias_cuentas].[11] is Null;0;5*10)
 
Thank you so much, the second version is the answer! so 'is null' stand for
there is nothing in the cell?! Anyway it seems to work! You saved me :-)!

Chris

John Spencer said:
Try one of the following. The first will test for nulls and zero-length
strings. The second will test for nulls only, but it probably what you need
and will be faster.

IIf(Len([7_Evaluaciones_Auditoriias_cuentas].[11] & "")=0;0;5*10)

or

IIf([7_Evaluaciones_Auditoriias_cuentas].[11] is Null;0;5*10)


Chris said:
The following is an if-function i am trying to get working but it doesnt
accept it and shows me if the cell
[7_Evaluaciones_Auditoriias_cuentas]![11]
equals to 5 it gives in the cell for 'Ãndice máximo 1' an #Error-message
(instead of doing the calculation of 5*10) and if i put nothing (it should
put a zero) it calculates 5*10. I just don't understand, it doesnt do what
it
should at all!

The if-Function: Ãndice máximo 1:
IIf([7_Evaluaciones_Auditoriias_cuentas]![11]="";0;5*10)

Please can someone help me with this as it seemed so simple but it just
wont
do.
 
Back
Top