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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting "2%" from entering just "2"

Status
Not open for further replies.

outsourceoncall

Technical User
Dec 20, 2001
36
US
What do I need to do to get a form field or a table field to allow easier data entry for percentages? For instance, if the value should be 2%, the user wants to jsut type "2".

I know this is a stupid question....
 
Why not just divide the enter value by 100? Make sure to test for zero... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Set the format property to Percent. Set the Decimals property to 0. Finally, put this code in the After Update event procedure of the control:
me.controlname = Me.[controlname]/100

That should do it. Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top