Change Entry to a nagative Value

jboyle

New member
Local time
Today, 21:21
Joined
Nov 18, 2000
Messages
53
I have text box that the user enters a quantity. I want this value to always be a nagative value and I do not want to rely on the user entering the minus sign. Is there a way that the user can enter the value of 100 and after update use code to change the value to -100 ???
Thanks in advance - john Boyle
 
why not try

if me.quantity > 0 then
me.quantity = -me.quantity
end if
 
Thanks FMM, your code performs exactly as I was hoping for.
John
 
Another way:

me.quantity = -(ABS(me.quantity))
 

Users who are viewing this thread

Back
Top Bottom