We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Display of decimal places in Access

Medium Priority
669 Views
Last Modified: 2012-05-11
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.
Comment
Watch Question

Consultant
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Luke ChungPresident
CERTIFIED EXPERT

Commented:
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.
Donald MaloneyConsultant

Commented:
Luke,
Nice ad but I think EE frowns on self advertizing.
Don

Author

Commented:
In my Report, I had the property set to General and 1 decimal place.  When I changed it to Fixed, it worked.  Thank you.
Luke ChungPresident
CERTIFIED EXPERT

Commented:
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.
Donald MaloneyConsultant

Commented:
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
Luke ChungPresident
CERTIFIED EXPERT

Commented:
@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.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.