supress "error"

S

smk23

How do I suppress "error" display on a calculated field where the input
values are null?
THanks!!
 
J

John Spencer

You can test the input values with an IIF and if one or the other is null
then return null otherwise do the calculation. This works in a query.

IIF(IsNull(Field1) or IsNull(Field2), Null, Field1 mod Field2)

In a procedure you would need to use an If ...Else...End If block to avoid
the error.
 
Top