Percent formatting??

S

Sandy

Why is it when I type 10 into a text box formatted as 'Percent' it shows
1000%, and when I type 0.1 it shows 0.0%?

How do I make the text box accept 10 means 10%?

Sandy
 
W

Wolfgang Kais

Hello Sandy.

Sandy said:
Why is it when I type 10 into a text box formatted as 'Percent'
it shows 1000%, ...

That's by design: "per cent" means "per hundet", so 1000% = 1000/100.
...and when I type 0.1 it shows 0.0%?

Probably the number field in the table has fieldsize integer or long.
To accept decimal places (10% = 10/100 = 0.1), it should be single or
double.
How do I make the text box accept 10 means 10%?

Enter 10% instead of 10, that will work.
 
S

Sandy

I changed the table field format to single and it now works fine and
calculates as it should.

Thank you Wolfgang
Sandy
 
S

Sandy

No I have to type 10% in both table and form. If I type just 10 for example
it shows 1000%.
Bit of a pain really.

Sandy
 
D

Douglas J. Steele

Unfortunately, it's working as designed.

10% really means .1. Easiest approach would be to enter .1. Alternatively,
you could use an unbound text box, divide the value by 100 in its
AfterUpdate event and transfer it to a (hidden) text box bound to the field
in the recordsource.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top