Operators - to +

XaloRichie

Registered User.
Local time
Today, 06:10
Joined
Jul 2, 2003
Messages
70
I have a form with two figures a.(Deposit) and b.(Actual charge)
To discover if the deposit was sufficient I take the actual charge (b)from the deposit (a)
When the deposit is less than the charge the Result is a minus.

eg
deposit 100
Less
Charge 150

= -50

I want to use that result to say ask the customer for another 50.00 but without it showing the minus operator.

Anyone know how?

P.S. It could be the other way and then a refund is suggested!
 
If you take the result and multiply by -1 you would remove the minus and all posistive values would indicate a charge whereas a minus would mean a refund

You could always use the original value to indicate Refund or Charge

Depends on how you actually intend to use/display result

Len B
 
operators

Yes great i'll try that.
I had forgotten those possibilities from school. :) Thanks
 
There's also the Sgn() function which returns one of three values: greater than, equal to, or less than zero, (1, 0, and -1 respectively.)
 
Absolute value

You want the absolute value of the number.

Abs(YourNum) will return 50 whether the value of YourNum was 50 or -50.
 
Why not just use the Format property of the control to display
50pts or (50pts) as the case may be
 

Users who are viewing this thread

Back
Top Bottom