Link to home
Start Free TrialLog in
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%
Avatar of epichero22
epichero22
Flag of United States of America image

Declare a variable as an integer and assign it to that value.
Avatar of 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.
Avatar of trbaze
trbaze

Avatar of gigifarrow

ASKER

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

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

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Scope: Format([Quantity]/11,"Percent") trbaze how would you divide 11 by quantity instead of quantity divided by 11
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%.
okay Thank you for your help
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.