Make a field a - number based on combo box

YNWA

Registered User.
Local time
Today, 19:25
Joined
Jun 2, 2009
Messages
905
Hi,

I have a combo box called InOut and the user selects either In or Out.

I also have a field called Amount.

What I need is if InOut = Out then the number I enter into amount has a minus sign before it or stores a minus number?

Is this possible?
 
Try this:

In the AfterUpdate of your Amount field :

If Me.InOut = "Out" then
Me.Amount = Me.Amount * -1
End if
 
Try this:

In the AfterUpdate of your Amount field :

If Me.InOut = "Out" then
Me.Amount = Me.Amount * -1
End if

It works, cheers!
 
It may be better to use:
If Me.InOut = "Out" then
Me.Amount = Me.Amount * -1
Else
Me.Amount = Me.Amount * 1
End if
 

Users who are viewing this thread

Back
Top Bottom