Percent format

bsdixon

Registered User.
Local time
Today, 22:47
Joined
Nov 13, 2003
Messages
62
I am having trouble formating a field in a form. The field is from a query. The field has a percent format with no decimal places. The table has the same format.

When I type in 14 the field in the form changes to 1400%. What do I need to change so that it reads 14%.

Thanks in advance for your help.
 
I don't know much about the percent format, but I do know that if you want to write a percentage such as 14% in decimal form then it is equivalent to 0.14. "Percent" means "out of a hundred". That is 14% equals 14/100 = 0.14.

So maybe this percent format requires entries in the decimal form, ie, if you enter 0.14 you should get your 14%.
 
This is an expected outcome.

14 is 14 x 1 = 14 x 100% = 1400%

You can enter 14% as 0.14


Yeah, what he said :)
 
If you want your users to always be able to enter the percent directly (eg 14 for 14%) then you could add the following:

Code:
Private Sub TextPercent_AfterUpdate()

Me.TextPercent = Me.TextPercent / 100
End Sub

Just a thought.

Brad.
 

Users who are viewing this thread

Back
Top Bottom