[Access] calculated field with condition

Hello,
I have a syntax issue with a field in a report.
It's a calculated field that calculates a change between figure A and figure B.
So in the properties, the Control Source of the field = (B-A)/A
It works, but I have a problem if A = 0; it shows #Div/0 (which is normal...). So I put
=IIf(B=0,0,((B-A)/A))
and there I get an error "The number in the expression is not valid".
I think my syntax is correct though. Does anyone have an idea?
For your information, the field has a percentage format.
Thanks in advance to whoever can help me out; I've been stuck for a while trying all sorts of syntax.

3 answers

  1. Moderator
    Hi,

    everything is going well here.

    Can you provide the full text of your request?

    --
    See you, Blux
     "Stupid people dare to do anything. That's how we recognize them." 
    0