As a matter of speed, I think doing the math in the sql query would be quicker. If using a text box to display, I believe there is a format property in which you can select percent.
Hope this helps.
"If it's stupid but works, it isn't stupid."
-Murphy's Military Laws
Thank you. I am actually trying to do this in a sql statement. the SQL statement for the division now returns .93839223. That's what i cannot figure out.
thanks
John - very interesting. I added your info to my Qry calc but i get a whole number EG 84% but i would like EG 84.4%. In other words, one decimal. what am i doing wrong? Here is my Qry calc:
Profit%: IIf([Sales$]=0 Or [Profit$]=0,"--",Format(Round(([Profit$]/[Sales])*100,1),"0") & "%")
Maybe there is further improvement needed by me?
I get the correct answer but with no decimal.
One last question. I now have my decimal. however, the answer is left justified and bumps up against the Profit$ column. For readablity, how can i make it right justified?
Molly
If this is a query directly then no, but if its bound to a control on a report or form you can set the alignment on the control to whatever you want.
There's no such thing as "Right justified." Right aligned means aligned to the right, left aligned means aligned to the left. Justified refers to text that is spaced such that it takes up the entire width of the control, and is more often used with word processor or web page documents.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.