Make a Field Value Negative

K

KMaurer

To make it easy for my user I am using two forms that look very much the
same to 1) add donations to my data base and 2) subtract grants. Both forms
go to the same tables that stores discriptions and amounts. I would like to
set up the grants form so that when she enters a value it automatically
becomes a negative number so she doesn't have to enter the negative sign or
the parenthesis. I can't find in the help files any way to do this. Kathy
in Cincinnati
 
R

Rick Brandt

To make it easy for my user I am using two forms that look very much the
same to 1) add donations to my data base and 2) subtract grants. Both forms
go to the same tables that stores discriptions and amounts. I would like to
set up the grants form so that when she enters a value it automatically
becomes a negative number so she doesn't have to enter the negative sign or
the parenthesis. I can't find in the help files any way to do this. Kathy
in Cincinnati

In the AfterUpdate event of the Textbox you could have code similar too...

Me!TextBoxName = Abs(Me!TextBoxName) * -1

The Abs() function is only there in case the user *does* enter the negative
sign so your code doesn't change it to positive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top