Negative currency field

S

Stephanie

Hello!
Is there a way to make the value in a currency field always be negative?
I'm using this field for payments and thought it would be nice if the user
doesn't need to remember to enter a minus sign.

I appreciate any suggestions.
 
K

Klatuu

I would try putting this in the Lost Focus event of the text box:

Me.txtNegativeCurrency = Abs(Me.txNegativeCurrency) * -1

(When I first saw "Negative Currency", I thought you were talking about my
financial condition :{ )
 
L

lwells

If your control was formatted to Currency then the result of Klatuu's
recommendation will show the results in brackets ($XX.XX)

If you want to display as a negative sign then use the format function
Me.txtNegativeCurrency = Format(Me.txtNegativeCurrency,"-$#,##0.00")

You can also format the control instead of using Currency to this:
$#,##0.00;-$#,##0.00[Red]
and use Klatuu's suggestion...this will show the value in the color Red with
a negative sign.

lwells
 
Top