Forum Discussion

Tony2021's avatar
Tony2021
Steel Contributor
Sep 18, 2024
Solved

#Error in output (need a handler)

Experts, how would I handle a #error output for some of the records?    the below doesnt work since records still have #error:  CurrAmount: IIf(IsNull([CurrAmt]),0,[CurrAmt])   thank you.  Let m...
  • Ken_Sheridan's avatar
    Sep 18, 2024

    Rather than calling the IIf function you can call the Nz function to return a value in place of a Null:

     

    CurrAmount:Nz(CurrAmt,0)

     

    With currency values, however, it is usually appropriate to set the DefaultValue property of a column to zero in a table definition, or, in the case of a computed column, return a zero in a query's result table. Null is the absence of a value and semantically ambiguous, e.g. what would a Null at the CreditLimit column in a Customers table mean?