Solved

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

Posted on 2013-06-27
6
370 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

688 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