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

Percentage value turning wrong 1

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
0
0
US
Wow, who would have thought that something simple like a percentage would be so complicated.

I set a txtBox format for percentage (00.00%) but it acts extremely touchy. If I enter 50, then the box shows 5000.00%. Some numbers I enter, like .25, result in 00.00%. No change! This is the weirdest thing I have seen yet in Access, but I figure it is an easily curable problem.

Thanks. Sean.
 
Is your field linked to a table. If so try makeing the field in the table a "Double" or "Single" instead of a "Long Interger". Hope this helps.
 
Tried both double and single, but neither worked. I am still getting 5000.00%.

ANy other ideas?

Thanks. Sean.
 
The percent format multiples you value by 100 which is how you convert a calculation.
For example what percent is 12 of 252.

12/252 = .04761 * 100 = 4.76%

Do you field is expecting a single precision value to convert to percentage.

Paul
 
Too complicated to expect the user to always remeber to enter .5 instead of 50 when there is a percentage sign staring him in the face in that field already.

I'll just set it to a number field and add a label with "%" after the txtBox.

Thanks for the help. Sean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top