F
Febra
I am very new to Access and have been trying to round the results of a
calculation in a query and then have the rounded results pull into a report,
using Access 97. The query is performing calculations using numbers entered
on a form. The numbers pulled from the form to perform this calculation have
differing numbers of decimal places. I have had to set the data type for
this calculation in the query as a general number as using any other data
type ends with a result that reads as 0.0 when the actual result should be
more like 1.777777778 . I understand that if I am able to change the data
type to currency that I would have less issues with rounding the number.
I tried the Left function and it did work, however, it did not round the
number from 1.777777778 to 1.8 . Then I read about the
Round(expression[,numberdec]) function, but after multiple attempts I always
ended up with an error message: "The expression you entered contains invalid
syntax. You may have entered an operand without an operator." After reading
some of the messages I see that there is a problem with the Round function,
sometimes rounding the .5 up or down, which would not work for my needs
either.
How would I designate that I want only two rounded decimal places to
display, and would this be entered as part of the calculation in the query
or part of the the report?
Thank you, Febra
calculation in a query and then have the rounded results pull into a report,
using Access 97. The query is performing calculations using numbers entered
on a form. The numbers pulled from the form to perform this calculation have
differing numbers of decimal places. I have had to set the data type for
this calculation in the query as a general number as using any other data
type ends with a result that reads as 0.0 when the actual result should be
more like 1.777777778 . I understand that if I am able to change the data
type to currency that I would have less issues with rounding the number.
I tried the Left function and it did work, however, it did not round the
number from 1.777777778 to 1.8 . Then I read about the
Round(expression[,numberdec]) function, but after multiple attempts I always
ended up with an error message: "The expression you entered contains invalid
syntax. You may have entered an operand without an operator." After reading
some of the messages I see that there is a problem with the Round function,
sometimes rounding the .5 up or down, which would not work for my needs
either.
How would I designate that I want only two rounded decimal places to
display, and would this be entered as part of the calculation in the query
or part of the the report?
Thank you, Febra