Solved

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

Posted on 2013-06-27
6
367 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
  • 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
update query 4 24
append macro insert 5 corresponding rows for each record 2 19
Trying to filter a sub-report 9 28
UK Date format in MS Access 4 20
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
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.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

792 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