Solved

# access percentage field

Posted on 2007-09-29
Medium Priority
1,372 Views
I have created a percentage field in access.mdb
I have used
Double
Percent
Decimal places 2
I have a default value of 5 where I expected to see 5% or perhaps .05 but in fact it shows 500%
Can anyone say what I am doing wrong please?
Thanks John
0
Question by:johnhardy
• 3
• 3
• 2

LVL 19

Accepted Solution

frankytee earned 1000 total points
ID: 19983510
you'll need to use default value of 0.05 to get 5%
0

LVL 18

Assisted Solution

Jinesh Kamdar earned 1000 total points
ID: 19983512
I guess since you have declared it as Percent, you should be entering .05 instead of 5 as the default value.
0

LVL 19

Expert Comment

ID: 19983515
it looks as though the percent format means you'll have to enter the value as a decimal "fraction" value out of 1, as Acces will then internally multiple by 100 to get the result as a percentage value.
so a value of 1 = 1* 100 = 100%,
0.05 = 0.05 * 100 = 5% etc
0

Author Comment

ID: 19983525
Thanks
I agree but if someone enters 5% in a field on a form they will expect the percentage to be 5% not 500% some very large commissions could be payable.
Perhaps its better  just to keep the field as a number. Any thought please?
0

LVL 18

Expert Comment

ID: 19983560
Yes, there is a work-around. When u enter a value in that field, suffix it with a % symbol i.e. enter it as 5% and not just 5.
0

LVL 19

Expert Comment

ID: 19983561
i would create it as simple numeric field with a % label on your form. but then you would need to divide that field by 100 when you do your calculations etc
or the other option is to retain the % field and get your user to enter the value as a number in an unbound textbox in your form and after applying whatever validation, divide it by 100 and set the result to the real (percent) field.
0

LVL 18

Expert Comment

ID: 19983567
Sorry, i submitted the previous post without completing it - Entering the value as xx% for that field (which is defined as Percent) implies that the entered value is itself a % and so Access does not multiply it by 100 internally.
0

Author Comment

ID: 19983608
Thanks for the help I am doing this via an asp form submission so I will keep it simple and revert to a numeric field.
KISS priciple very good!
John
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
###### Suggested Courses
Course of the Month16 days, 1 hour left to enroll