Decimal Places displayed

Tracy

Registered User.
Local time
Today, 22:42
Joined
Oct 19, 2001
Messages
71
Does anyone know how to specify how many decimal places are displayed for a decimal in a field on a form.

I am currently using the round function

So Round(x / y, 2) This displays x / y rounded to 2 decimal places.

Muy problem is that if x divided by y is an integer (i.e. no decimal places needed), I still want it to show 00 behind the decimal point, but it doesn't.

Anyone know how to fix this.

Thanks
Tracy
 
Use the DecimalPlaces property of your controls to set it to the number of decimal places you wish - you can have from 0 to 15 decimal places.
 
Thanks for the tip, but if the last decimal place is a 0 this doesn't work. So, for example, 15.00 will still display as 15, 15.30 will display as 15.3

Any other ideas?
 
You can set the format of the control.

I think 0.00 will work.
 
Still no luck. Can't set the format to 0.00. I tried setting it to fixed with 2 decimal spaces but it just won't display them. I'm completely out of ideas here. Sure there must be a way.
 
Fixed with two decimals works for me.

If you are applying any formatting in the table or query, take this out and rely on the formatting for the control on the form.
 
Yeah, sorry, I'm being a div, it works fine.

Thanks
 

Users who are viewing this thread

Back
Top Bottom