Link to home
Start Free TrialLog in
Avatar of GIStewart
GIStewart

asked on

Display of decimal places in Access

I have a field that is derived from a Select query.  An example of the possible values are:

100
100.2
100.33

I am looking for a format either in the query or in a report that will show these values as:

100.0
100.2
100.3

I can get the formatting correct on the 2nd and 3rd values, but I can't get the first one to add the decimal place in the same way that excel does it.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Donald Maloney
Donald Maloney
Flag of United States of America image

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
Avatar of Luke Chung
From the query designer, you should be able to right click on that field, and set the format property. Choose Fixed with 2 decimal places and you should get what you want.

My paper on Query Tips and Techniques touches on this briefly for displaying data as formatted percentages: http://www.fmsinc.com/tpapers/queries/index.html

Hope this helps.
Luke,
Nice ad but I think EE frowns on self advertizing.
Don
Avatar of GIStewart
GIStewart

ASKER

In my Report, I had the property set to General and 1 decimal place.  When I changed it to Fixed, it worked.  Thank you.
Not sure why you think my paper on queries is an ad.

That thread you referenced which suggests using a Format command in the query expression rather than the format property of the field is wrong and slow compared to my suggested solution.
Luke,
If you are not advertising why have a click link: Microsoft Access Programming Services
I will send you a Q via personal email since I have an app that I may need help with to save coding time.
Don
@donaldmaloney: those are just side ads independent of the technical content on the page. I guess if people are offended by that, we can't mention any of the content on our site. I'll let the moderators determine if what i did was wrong. The paper I referenced (or at least an earlier version) was deemed worthy enough that Microsoft published it on MSDN. Considering the Accepted answer on this thread is worse than what i recommend, I think i'm on pretty solid technical footing.

As for any help you may need from my firm, that's always welcome but not the reason I participate here. Just trying to help the community.