Solved

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

Posted on 2013-06-27
6
359 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now