J
John Porcella
A colleague was asking me how to use MS Access to round numbers to the
nearest 1/500th. This means that numbers must be rounded (God knows why!)
to 0.002, 0.004, 0.006, 0.008 or 0.000. So for example, 1.23456 would be
converted to 1.234, and 6.25012 would be shown as 6.260.
Ideally, no VBA or SQL should be used.
I have come up with a handwritten algorithm which (I think) will do the
trick. However, I do not know how to implement this in MS Access.
The problem is to display answers to some calculation or other to the
accuracy as mentioned above.
I can tidy up my written algorithm and post it here if it helps, but I do
not want to influence your thinking. My algorithm looks slightly involved
and cumbersome and I was hoping that there was an easier way!
On a slightly related issue, can numbers be truncated in MS Access? For
example, if I have the number 1.23456 and I want this truncated to three
decimal places (i.e. to 1.234, not rounded!!), is there a command to do
this?
Thanks in advance to all, and if it would help to post my little algorithm,
then just tell me.
nearest 1/500th. This means that numbers must be rounded (God knows why!)
to 0.002, 0.004, 0.006, 0.008 or 0.000. So for example, 1.23456 would be
converted to 1.234, and 6.25012 would be shown as 6.260.
Ideally, no VBA or SQL should be used.
I have come up with a handwritten algorithm which (I think) will do the
trick. However, I do not know how to implement this in MS Access.
The problem is to display answers to some calculation or other to the
accuracy as mentioned above.
I can tidy up my written algorithm and post it here if it helps, but I do
not want to influence your thinking. My algorithm looks slightly involved
and cumbersome and I was hoping that there was an easier way!
On a slightly related issue, can numbers be truncated in MS Access? For
example, if I have the number 1.23456 and I want this truncated to three
decimal places (i.e. to 1.234, not rounded!!), is there a command to do
this?
Thanks in advance to all, and if it would help to post my little algorithm,
then just tell me.