#type error in calculated field (1 Viewer)

dkmoreland

Registered User.
Local time
Today, 04:08
Joined
Dec 6, 2017
Messages
129
I know you folks have seen this question a hundred times but I need to ask it anyway.:p

On my report, if the shipped quantity is equal to the order quantity, I need it to display 0 in the field. If it is not equal to the order quantity, I need it to display the value of the shipped quantity.

Here's my code for the field:
Code:
Iif([Shipping Qty:] <> [Order Quantity],[Shipping QTY:], 0)

I'm getting a #type error - both fields are number fields. I'm also getting a circular reference error.

Is my Iif statement incorrect or did I miss something else?

BTW - I know the field names are funky - I inherited this system.

Thanks in advance for any and all insight.
 

Ranman256

Well-known member
Local time
Today, 07:08
Joined
Apr 9, 2015
Messages
4,337
don't put it in the report, put it in the query.
then the report just shows the field.

if you must use the report, be sure to use TEXT BOX names. But sometimes the textbox and field names are the same.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:08
Joined
Aug 30, 2003
Messages
36,118
Also make sure you precede the formula with "=".
 

isladogs

MVP / VIP
Local time
Today, 11:08
Joined
Jan 14, 2017
Messages
18,186
Yes the field naming is bad as the OP herself pointed out in post #1
However using [], it will still work
 

Users who are viewing this thread

Top Bottom