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%
The answer I get back is :9.09090909090909E-02%
How would I make it say : 9%
Declare a variable as an integer and assign it to that value.
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.
ASKER
Quanity is a number. so how would I put percentage? Like this :
Scope: Quantity]/11 "Percent"
Scope: Quantity]/11 "Percent"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Scope: Format([Quantity]/11,"Perc ent") trbaze how would you divide 11 by quantity instead of quantity divided by 11
Same way you would quantity by 11.
Format(11/[Quantity],"Perc ent")
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%.
Format(11/[Quantity],"Perc
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%.
ASKER
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.
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.