473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Percent Format Type

58
Every time I calculate numbers to get a percent format type in a query It gives me a big number. For instance: 7689.43% instead of 76.89%. I tried every possibility in the Property Sheet and It doesn’t change the way I want. How can I change the Format defined? I have MS Access 2007. I’ll be grateful if anyone can give me some ideas.

Thank you in advanced

Plaguna
Jul 18 '08 #1
4 6015
Delerna
1,134 Expert 1GB
Can you post the query and some data that is being used to calculate the percentage
Jul 18 '08 #2
Stewart Ross
2,545 Expert Mod 2GB
As Delerna said, it helps if we see the calculation. I am sure, however, that the problem with your number formatting is that you are (correctly for what a percentage actually is) multiplying your ratio result by 100 - which Access and Excel annoyingly does over again in its percent formatting.

The percent format in Access, like Excel, expects percentages to be the result of taking the ratio of

Some Value / Some Total

not

Some Value / Some Total * 100

As mentioned, Access and Excel's percent formatting automatically multiply the result by 100 for display (but please note that the value stored remains unaltered).

For example, if Some Value is 1 and Some Total is 3, Some Value / Some Total = 0.33333... which will display as 33.33% using the percent format with two decimal places.

If you want to use the built-in percent formatting, don't multiply the result by 100 first.

-Stewart
Jul 19 '08 #3
youmike
69
At the risk of being controversial, I'd challenge Stewart's use of "annoyingly". The percent format is just what it says - a format or a way to portray underlying data, and not a method of calculating. It's up to developers to attend to the calculation niceties and most important to give specific guidance to any users of their systems as to precisely what must be input.

Access contain several Microsoft quirks - this is not one of them.
Jul 20 '08 #4
plaguna
58
This is what I’m trying to do:
Input,
Warranty Labor Sales = 47,709.00
Service Contract Labor Sales = 2,849.00
Warranty Labor Gross = 36,606.00
Service Contract Labor Gross = 2,321.00

Query percent calculation:
Total Warranty Labor Gross Profit %: ([Warranty Labor Gross]+[Service Contract Labor Gross])/([Warranty Labor Sales]+[Service Contract Labor Sales])

I was reading all about Numeric and Currency field format type, Format Defined, Custom format, conversion issues, etc. and, I found that what Stewart said is correct. Every time one uses a built-in percent formatting, (Numeric data type, and percent format) the number value is automatically multiplied by 100 and, a percent sign is added to the right (percent values displayed with 2 decimal places). Now, if one creates a percent calculation in a query using a built-in percent formatting, it has to be calculated without multiplying by 100, the otherwise it does it twice, and it will display 7699.47% instead of 76.99%. I tried it and It works.
Thanks everyone.

Plaguna
Jul 22 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: MX1 | last post by:
Hi all, I've setup a table with one field that will hold percent values. The type is number and the format is percent on the field. When I do data entry directly into the field, I have to put...
1
by: Terencetrent | last post by:
I am trying to format a query expression drawn from a dialog box as percent. The original statement to get the value for the query is as follows: New%markup: !! The dialog box looks the...
0
by: Macbeth | last post by:
Thanks to All who Help, I am creating a crosstab querry to place in a report. All my data is correct and I do not seem to have any problem with this area. I am having problems with displaying...
3
by: Nothing | last post by:
This is going to be a really stupid question, but I am having a problem with the percent format in a control on a form. My end goal is that I want the user to enter 17 and have the control...
1
by: Alan Lane | last post by:
Hello world: I'm having trouble finding how to escape the percent sign ("%") from a SQL query so that it will show up in an Access report. Here's my SQL string ... '--Build SQL String...
5
by: ljlevend | last post by:
Is there a TypeConverter that converts Doubles to percent values in a PropertyGrid? The Windows.Forms.Form.Opacity property seems to use the TypeConverter that I want. Thank you, Lance
39
by: VidTheKid | last post by:
THE PROBLEM The % symbol is too vague when defining dimensions in CSS and HTML. It can relate to an inherited value, a measure of the containing element (which can differ between box models) or...
1
by: parthis | last post by:
Hi, I am new to Access and working a Report to display a Percentage value. The value in db is a text with value 23 But when i apply Format = Percent in design view of Reports it renders it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.