Null Value - in Total

  • Thread starter Thread starter SDDiamonds
  • Start date Start date
S

SDDiamonds

I need to tell my orders form that the line total is = to
value B only if Value A is $0.00 (the default amount).
How do I do that?
 
The following returns value B if value A=0, otherwise it returns value A.
And if A is Null (undefined), value A is assigned the value of 0.

=IIf(Nz(A, 0)=0, B, Nz(A, 0))

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
How do I define Value B in that expression? For Example:
A= My Diamond Line Total (Per Carat Price * Weight *
Quantity)
B= Jewelry Line Total - but I don't have it defined
anywhere. . .I have your formula in there - and it seems
to work - unless there is a jewelry item. . . .
How can I tell it that it need to calculate the Adjusted
jewelry price * quantity - discount etc. . .in the
formula you gave me??? I really appreciate the help!
 
How you define value B in this situation is up to you. It could be a
textbox, a variable (populated by a calculation), or a value entered in an
InputBox. If you don't want to specify a value for B, make it 0 (or
something else).

Either way, if you want to say B=C if A=D, you must also say what B should
be if A<>D.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------
 
Back
Top