Rounding in caculated field

cpberg1

It's always rainy here
Local time
Today, 15:06
Joined
Jan 21, 2012
Messages
79
Let me just start with a :banghead:

I'm trying to get a query to perform a calculation and round the results.

The fields that I am running the calculation and am trying to round are Data Type Number, properties Field size Single and decimal places Auto.

I have tried the built in function described in Allen Browne's site to no avail.
http://allenbrowne.com/round.html

I have tried rounding the individual fields and then adding result.
I have also tried rounding the result (as attached).

Any thoughts?
 

Attachments

  • Query example.png
    Query example.png
    25.5 KB · Views: 178
also, will re-name the calculated field "time" to LessonTime. So as to avoid restricted words.
 
The use of the Single data type is not recommended for rounding . Is changing to Double and option you could use ? as you example would then work . I have found that floating point numbers a little tricky to use.

regards Ypma
 
There is presumably an issue, problem or question here. So what is it?
 
There is presumably an issue, problem or question here.
So what is it?
My understanding is that the issue is that the Rounding function to one decimal point fails to work when using Single number data types, The question is that the Op would like to know why ?

Regards Ypma
 
Define "failure" - this normally involves some expectation AND some result not matching that expection. There is nothing in the post indicating any software failure or problem. As to the expectations I'd rather not guess so I ask.
 
Define "failure

The post clearly show the use of the function Round with the expectation of a answer to one decimal point, and the result is clearly not what was expected, as shown in the png , so I am at a loss as to why we are not trying help him/her instead of worrying about defining words.

Regards Ypma
 
..
I'm trying to get a query to perform a calculation and round the results.
...
In query design, mark the field/column "Time", ("LessonTime"), and set the property "Format" = "Fixed" and the "Decimal place" = "1"
 
JHB, Not my post but have learned something thank you,

Regards Ypma
 
In query design, mark the field/column "Time", ("LessonTime"), and set the property "Format" = "Fixed" and the "Decimal place" = "1"

JHB, Thank you for the guidance. Worked like a charm, and I learned something also!
 
Define "failure" - this normally involves some expectation AND some result not matching that expection. There is nothing in the post indicating any software failure or problem. As to the expectations I'd rather not guess so I ask.

Spike, thank you for the reminder to define the failure (expectation and result) clearly.
 

Users who are viewing this thread

Back
Top Bottom