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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top