Expressions in queries that have an #error message come up in rec

M

M Wiseman

I have the expression in a query,
% Change WOW Units: ([Last Week POS Qty]-[Current Week POS Qty])/[Current
Week POS Qty]
I keep getting an error message in records. I believe it is because some
records have 0 as the qty. How do I have it not recognize the value as a
zero and thus not get the #error message?
 
K

kingston via AccessMonster.com

IIF([Current]>0,(([Last]-[Current])/[Current]),0)
Make sure you enclose the subtraction in parentheses. Otherwise it'll always
result in [Last]-1 if [Current]<>0.


M said:
I have the expression in a query,
% Change WOW Units: ([Last Week POS Qty]-[Current Week POS Qty])/[Current
Week POS Qty]
I keep getting an error message in records. I believe it is because some
records have 0 as the qty. How do I have it not recognize the value as a
zero and thus not get the #error message?
 
Top