Round the decimal portion on a field not the integer
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I have both the table field and the form field set to 2 places for decimals and have tried changing the format from long integer, to double, to Single, to decimal. some round up.
Some round down. But nothing lets the value stay as I enter it. I'm aware I can change it to a text field, but I need to perform a calculation on the value I enter.
InternalVolume = Round(((Mysgl_Length * 0.25 * Pi * (Mysgl_ID / 1000) ^ 2) * 1000), 2)
Ive set the field to a general number with two decimal places and even used the Round function within the query. The question is why wont the numbers round down to the number of places Im specifying
If I round (179.839996) I'll get 180 - it rounds up to 180. I juest need the get the the numbers to the left of the decimal without any rounding
How do I use that integer to format the control printing the result on a form. I don't wish to have separate reports for differing decimal places.
If I add 0.005 I will get the correct value for this, but if I get an answer of say 100.3848 and I round it after adding the .005, my answer is wrong.
My problem would be solved if I could test the number of digits after teh decimal place.
using the right(Cinput, 1) function to test the last decimal, it returns either the 2nd, 3rd or 4th digits depending on how many decimal places there are.
If the fraction portion of the number is below 0.5, then I want to round the number down.
If the fraction portion is greater than or equal to 0.5, then the fraction should be 0.5.
For example, a value of 6.7 hours should display as 6.5.
calculations. I want my total to round off to the higher whole no. ie: 1.23 to 2
I have format set to fixed and decimal to "0" I can't find any other property to do this. I think in table design
one can do this with integer setting, but as I say my text boxes are not bound to any table.
Now me having this experience, crafted the solution of a problem that depending on this behavior, only to notice that this function:
someInt = CInt(4.51) '(or higher)
will actually round the number to 5 for me. I was depending on the different behavior.
Any simple way to just lose the decimal
May I pefrom this by creating Query or Table is enough?
12.36 and 14.67 but
even though I change the auto decimal to "2" and the format to standard its show the form field like then 00.00 but when enter any deicmal data it comes up with round up