I have the following expression in an MS Access Query, where some of these values can be null and despite the cast to a Decimal and the Not Zero (NZ) function, I still get an overflow error.
I hope someone can help me find the bug?
Sum(Cdec(Nz([TotalPrice]/([tbl_ArticlesPerOrder]![Amount]*[Total])*[tbl_ArtikelRemoveFromSawList]![Amount]),0))
EDIT: Removing the TotalPrice division removes the overflow. So I suspect a division by 0. Any way to deal with that?