Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confounding Decimals

Status
Not open for further replies.

Crevalle

Technical User
Aug 16, 2004
36
US
I've done three forum searches, but nothing seems to be working. I have a very simple select query (which feeds a report of mine) that has a field that uses the "Avg" function. However, the averages are 2.774645376378 or 10.7369859837, etc. I would like just two decimal places to show up.

I've tried using the "format" expression, but my syntax must be incorrect.

Would it possibly be easier to format the number in the report? I went to the report, clicked "properties" on the field I reference above, and there is no option for decimals.

Please help!
 
If the number/column/field shows up right aligned in the query, you should be able to set the text box in the report to
Format: Standard
Decimal places: 2

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
dhookom--When I check the properties in the report, there is no field for "decimal" or "decimal places" in the "all" tab.

Also, in the actual query, if I go to properties on the specific averaging field, I can select "2" in the decimal area, but it doesn't work.
 
Sorry--I was looking at the "label" properties. Works like a charm. Thanks!
 
Does the field/column in the query datasheet view display as left or right aligned? If left aligned then it is being treated as text for some reason. You would need to convert it back to numeric using
=Val([YourField])
This should then allow you to set the decimal places.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top