johnhardy

asked on

# access percentage field

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

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

ASKER CERTIFIED SOLUTION

membership

Create a free account to see this answer

Signing up is free and takes 30 seconds.

**No credit card required.**SOLUTION

membership

Create a free account to see this answer

Signing up is free and takes 30 seconds.

**No credit card required.**ASKER

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?

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?

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.

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.

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.

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.

ASKER

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

KISS priciple very good!

John

so a value of 1 = 1* 100 = 100%,

0.05 = 0.05 * 100 = 5% etc