if function error in a Querie

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.
 
J

John Spencer

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)
 
G

Guest

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.
 

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

Top