Decimal Places Not Working

BigNate

Board Regular
Joined
Dec 17, 2014
Messages
242
Hello Everyone,

I have a form that I have a field set to two decimal places. However, the results return 10 decimal places. How can I change this so that it only shows to two decimal places?

Thanks,
BigNate
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
maybe wrap the result in round(cell value,2)
 
Upvote 0
Mole, I appreciate your response on this thread as well. I am trying to do this, but am having issue. This is what I am trying without success:
1. In Form design view, I go to the control
2. My field is called "Duty Rate", I type Round([Duty Rate], 2)

and then I get #Type! as the results.

Any idea what I am doing wrong?

Thanks again!
 
Upvote 0
Ah, I didn't notice you have two threads virtually asking the same thing running. I haven't used Access for along time have a look here > MS Access: Round Function see if that helps
 
Upvote 0
Might need to be =Round([Duty Rate],2)

Or create a query with the rounding in the querydef, and base your form on the query.
 
Upvote 0
Beware that Round function in Access rounds the last digit in the number of digits described to an even number. It does not round in the conventional manner.
So Round(12.75,1) becomes 12.8 as you might expect, but 12.65 becomes 12.6, not 12.7
Consider also the format function to specify the number of digits before or after the decimal, as well as the thousands separator.
 
Upvote 0
Micron, thank you for your input. Can you please tell me what I would need to type in design view to get the format function to work properly? My field name is Duty Rate.

Thanks for your help and time!
 
Upvote 0
It could be as simple as looking on the property sheet format tab for the control and switching it from Auto to the number of decimal places you want to see, as long as you have the format on the format tab set to something that supports this, such as Fixed or Standard. I'd try that first.
Otherwise, AFAIK, what you're asking for has to be done with vba. If your control is bound to a field and you try to do =Format([SystemID],"#,##0\].\[00") in the control itself, you will get either #Error, #Name or #Type as a result. In vba, if you apply a format to a bound field and for example, format 12.1234 to 1 decimal place, you will actually change the value in the table to 12.1. The vba route would be typically used with unbound fields. I strongly suggest using the property sheet.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,744
Messages
6,126,618
Members
449,322
Latest member
Ricardo Souza

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top