var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Error Handling
I have a problem with a query in access. I am trying to divide two numbers by each other. When I run the quesry it gives me an error message. I have tried to amend the query with the iif iserror command but that doesnt work either.
can somebody suggest the best way to do this??
I have agiven an example of the query below
total %: IIf(IsError([DA Arrests LY]/[DA Arrests TY]),0,([DA Arrests LY]/[DA Arrests TY]))
what's the error? div / 0 ?
total %: [DA Arrests LY] / nz([DA Arrests TY], 1)
edit: I suppose I should explain that logic...
If DA Arrests TY is null, then the result will be 100% which is mathematically sound.
Last edited by Teddy; 07-07-04 at
I would do the following:
IIf([DA Arrests TY]=0,"?",([DA Arrests LY]/[DA Arrests TY])
Replace the ? with whatever you want. But it might be misleading to put in a zero.