I have searched for answer to this problem and seem to be dead ended.
I have a form with two text boxes (we won't worry now about where that info comes from)
One text box always has 0 or positive numbers (txtPositive) and the other text box has 0 or negative numbers (txtNegative)
I have another text box (txtAnswer) that calculates an answer from either of these two, depending on the positive or negative input recieved from elsewhere, with another text box (txtHours)
txtPositive is Currency format
txtNegative is Currency format
txtAnswer is Currency format
txtHours is General Number format
This is the formula in txtAnswer:
=IIf([txtPositive]>=0,([txtPositive]*[txtHours]),([txtNegative]*[txtHours]))
I could use this formula as well, but it doesn't seem to work any better:
=IIf([txtNegative]<0,([txtNegative]*[txtHours]),([txtPositive]*[txtHours]))
The problem is:
When there is a positive number in txtPositive everything is great, but a negative number in txtNegative makes the answer 0.
I used this formula in a completely different text box and it worked good:
=IIf([txtNegative]>0,0,([txtNegative]*[Hours]))
txtNegative = -$2.10
txtHours = 10
Answer = -$21.00
But this doesn't help because I won't have a calculation if there is a positive number in txtPositive.
Does anyone else have the same problem?
Is there a way to get around it somehow?