Add a minus sign in front of an amount

wrightie

Registered User.
Local time
Today, 20:15
Joined
Jun 11, 2009
Messages
22
Hi,

I'm struggling with this...
What we have is an input form which inputs data straight into a table.
One of the fields is a debit field where the user has to enter an amount. Unfortunately alot of the users aren't bothering to put a minus sign in front of the amount they are inputting.

So what I'd like to be able to do is to automatically put a minus sign in front of the amount.

Is this possible ?

Cheers
wrightie
 
If the field is a "debet amount" it should be positive... The field name by default is then negative....

Just leave it stored as positive and in queries/reports make it negative simply doing: Yourfield * -1
 
Thanks namliam

But what the boss wants is for when the user enters the amount and then tabs on to the next field for a minus to appear in front of the amount. The user can then see that it's a negative amount and it will be stored in the table as a negative amount.

It's giving me a real headache !!

Cheers
Wrightie
 
I suggest next;
In Sub yourfieldname Before Update put tihs code:

If Me.YourField > 0 then
Me.YourField = Me.YourField * -1
End If
 
Ah excellent :D

Thanks so much MStef it works a treat.

wrightie
 

Users who are viewing this thread

Back
Top Bottom