Solved

Access Forms - Percent field - entering 30 sometimes = 30% sometimes 3000%

Posted on 2013-06-27
6
368 Views
Last Modified: 2013-07-01
I am working with Access 2010 adp - On a continuous form with a percent field.

On most PC's when you tab into the field it is displaying say 0.0%. If you key in 30 this accepts this as 30% and updates the table as 0.30. On some PC's when you enter 30 it converts this to 3000% - putting 30 in the table.

Does anyone know what controls this - is there a windows setting - Is there any way to overwrite this setting with code or a setting in Access?.
0
Comment
Question by:donhannam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 5

Expert Comment

by:sriramiyer
ID: 39283582
0
 
LVL 5

Expert Comment

by:sriramiyer
ID: 39283620
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 500 total points
ID: 39285616
FWIW, Ultimately (to avoid ever running into this issue)
You can certainly allow the user to enter "30", ...
...But then in a query you should be doing something like this:

SELECT ID,KeyedInPercent,KeyedInPercent & "%" AS FormattedPerecnt,KeyedInPercent/100 AS ActualPercent
FROM YourTable

Then just reference the "ActualPercent" field for any calculations
...and reference "FormattedPerecnt", for display purposes...
;-)

Note:
If the allowable values will be 1-100 (1%-100%)
...then you can create a combobox for the user to select a formatted percent, but actually "store" the actual percentage.
The combobox rowsource would look something like this:
FormattedPercent,ActualPercent
1%,.01
2%,.02
...
...
10%,.1
...
75%,.75
...
100%,1

Here you would update the table with the "actual" percent.
;-)

JeffCoachman
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:donhannam
ID: 39285921
Thanks for the comments.

Yes I could put code in to detect the value and convert but I have a lot of Percent fields and its a big job to do this.

This has been working fine for some time and all people could key in 30 and it gets recorded as .3 in the table. I now have one user who this acts differently on. In earlier versions of access this seemed to not convert but 2010 has been doing this fine till now.

I am hoping to work out what is different about the one user that this works differently on - whether it is a PC setting or something with there settings in Access.

Appreciate any help.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 39286160
Then this sounds like a "Regional" setting,.
...or a version of Access for a specific country was installed...
0
 

Author Closing Comment

by:donhannam
ID: 39291800
Thanks for comments. The PC that was having problems with this is now working correctly - nothing has been done to it except possibly a windows update. No idea what caused this but all OK now.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question