bound text box with percentage (1 Viewer)

zezo2021

Member
Local time
Today, 13:01
Joined
Mar 25, 2021
Messages
381
Hello

I have textbox on a form bound to a table

when changing the format to percent

it display number 17 to be 1700%

I want to show it as 17%


thank you
 

Mike Krailo

Well-known member
Local time
Today, 07:01
Joined
Mar 28, 2020
Messages
1,042
When there is no Formatting applied, your value in the text box should be 0.17. Is that the case?
 

Mike Krailo

Well-known member
Local time
Today, 07:01
Joined
Mar 28, 2020
Messages
1,042
That's your problem then, it should be 0.17 to yield 17% with Formatting.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:01
Joined
May 7, 2009
Messages
19,233
if the number is Readonly, you can add another Unbound field and display the Correct percent value.
the ControlSource is:

=[theOriginalField] / 100

now, apply Percent format to this unbound textbox and hide the Original textbox.

Or you can create a Query with new Calculated column (same as the above with Percent format) and use the Query on your form.
 

zezo2021

Member
Local time
Today, 13:01
Joined
Mar 25, 2021
Messages
381
if the number is Readonly, you can add another Unbound field and display the Correct percent value.
the ControlSource is:

=[theOriginalField] / 100

now, apply Percent format to this unbound textbox and hide the Original textbox.

Or you can create a Query with new Calculated column (same as the above with Percent format) and use the Query on your form.

can I use a custom format?

###.000

the textbox is bound to the table and the user enter data inside this textbox
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:01
Joined
Feb 19, 2002
Messages
43,223
Changing a format does not affect how something is stored. Open the table in design view and remove any formatting from the field in question. Save and close. Open the table. What is the stored value? If the value is 17, then that explains what happened since in reality, the value of a percent is normally less than 1 so 17% in math is .17. So, first, you need to update the actual stored values. Run an update query that divides the values by 100. Once that is done, you can change the format to Percent and the .17 will now show as 17%.
 

Users who are viewing this thread

Top Bottom