Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force negative sign with input mask

Status
Not open for further replies.

fishtek

Technical User
Aug 21, 2002
56
US
I'm looking for a method to force the user to insert a negative sign in front of a number. I've tried various input masks but none seem to work and still allow a positive number to be entered. Thanks for any help.
 
Are you ALWAYS expecting a negative number????

You could also use the LostFocus event or some such and validate the result....

If the user types in a positive number, either prompt them to change it or multiply it by -1.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top