rounding off

sassenach

Registered User.
Local time
Today, 02:23
Joined
Mar 10, 2003
Messages
42
hi,

In my reports, I have an order form.
In the order form I have a calculated total of the products the user bought. I would like to round off all of the products to two decimal points, but i want them to be .00.
example:

127.64
+34.22
=
162.00

how do i go about doing this?

thanks
 
You can use the int() function to return only the integer portion of the numbers.

However, I think this meens that 3,8 will be returned as 3. To solve this, you can first add 0,5 to the numbers, like this:

3,8 + 0,5 = 4,3

Int(4,3) = 4

whereas:

3,3 + 0,5 = 3,8

int(3,8) = 3

Now I haven´t done this for a while, so I suggest you look up the int() function in help for the syntax.

Or maybe there is a better way. I use A97, maybe later versions has a built in funtion.

Fuga.
 
fuga,

i am not so familar with where to put these function (such as int() ) so if you can be more specific. that would be great.
i did a search in ms access (xp) but nothing really showed up on this function. the only thing i received is how to choose how many decimal points.
thanks
meytal
 
I'm relatively new to this, but you could always consider rounding to a whole number then concatenating the ".00"

ex: Round(number,0) & ".00"
 
Actually I just tried it and it didn't work out right. However, there is an even easier solution....

Just use the round function to round off the sum of the numbers to be calculated

ex: Round(thenumber,0)

Then set the format to "fixed" and the number of decimals to 2
 

Users who are viewing this thread

Back
Top Bottom