darragh murray

It is not the critic who counts

About

A place where I can write irrelevant anecdotes that make me sound like a pretentious git.

A quick tip to fix what shouldn’t be a problem!

Occasionally, Access can act rather confusingly. I ran into a typical example early this morning, when I was trying to get Access to allow entry of percentages correctly. I’ve done this about one thousand times before and probably solved this problem one thousand times as well, but every time it happens it causes me to scratch my head (mostly in disbelief).

What happens is this: You set up a field in a table, designate it to be formatted as percentage. Right OK - you go to your form design, set up your input fields, and then try to enter a number as a percentage, and notice that it keeps rounding to 100% or 0%. Frustration ++.

Back to table design. The problem here is that you have to correctly set the field data type as well as the data type format. However, the data type is not integer, double, or even decimal - it is usually single. Once you set that on your percentage fields, you can enter data in decimal format (i.e. 0.5, 0.25 etc etc) and it will show up in its proper percent format.

I know this is shouldn’t be a problem but, amazingly, people get caught by it all the time, and there doesn’t seem to be clear answers on the web. Hopefully this tip does something to addressing this issue.

6 Responses to “Ms Access - Percentage Field Formatting”

  1. Thank you.

    You are a lifesaver. I have been pulling my hair out with this for two days!

    Brett

  2. Brett. No worries. Glad I could be of assistance.

    daz

  3. Thank you!
    I was really stuck on this on, hit this site on a Google search and Bingo, quick, easy and simple solution.

    Thanks agein!

    John

  4. John - no worries! Glad to be of service.

    daz

  5. But what if I want to enter “2.5″ on the form and for it to be displayed as “2.5%” and stored as “2.5%” in the table?

    SimpleSimon

  6. From memory, it might depend on your access version. Newer versions have figured this out (that when you say 2.5 in a percentage field, you mean 2.5% and not 250%). You could simply set it to percentage.

    daz

Leave a Reply