iif statements to enter data

D

Dflynn01473

I have two controls of a form: Pledge and Gift. I would like to update the
pledge automatically when a gift is recieved and posted. I tried using an
update query that would run when the Gift field is updated. I tried building
the query with this update expression iif(NotNull([pledge]), [Pledge]-[Gift])
in the Pledge filed. Access didn't like the expression. Any ideas about how
to do this?
 
W

Wayne-in-Manchester

I assume that both fields are currency (pledge and gift) or at least
numerical ?

NameOfExpr: IIf([Pledge]>0.01,([Pledge]-[Gift]))
 
B

Barry Gilbert

NotNull is not a valid function. Try IIF(Not IsNull([pledge]),[Pledge]-[Gift])

Barry
 
Top