Avatar of gigifarrow
gigifarrow
 asked on

Rounding Numbers

I have a query that states : Scope: [Quantity]/11 & "%"

The answer I get back is :9.09090909090909E-02%

How would I make it say : 9%
Microsoft Access

Avatar of undefined
Last Comment
trbaze

8/22/2022 - Mon
epichero22

Declare a variable as an integer and assign it to that value.
Helen Feddema

What data type is the Quantity field?  If it is a numeric field, then you could format it as Percent, instead of appending a percent sign (which is text).  You can also select the number of decimal points to display; this is usually done in a textbox on a form or report, rather than in a query.
trbaze

Your help has saved me hundreds of hours of internet surfing.
fblack61
gigifarrow

ASKER
Quanity is a number.  so how would I put percentage? Like this :

Scope: Quantity]/11  "Percent"
ASKER CERTIFIED SOLUTION
trbaze

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
gigifarrow

ASKER
Scope: Format([Quantity]/11,"Percent") trbaze how would you divide 11 by quantity instead of quantity divided by 11
trbaze

Same way you would quantity by 11.  
Format(11/[Quantity],"Percent")

Remember that the percent format funtion will move the decimal two places.  So if 11 / 2 is 5.5, then doing the percent format will make it 550%.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
gigifarrow

ASKER
okay Thank you for your help
trbaze

Your welcome.
You can also use the FormatPercent function and choose the number of decimals to display.  Both of these are listed in Access' built-in help.