View Full Version : Problem with rounding numbers


Danielf
06-02-2008, 01:43 AM
Hi,

I am multiplying Field "A" (2 decimal number) by Field "B" ( 4 decimal number) . The result is field "C" ( of course sometimes a 4 decimal number);

Even if I use the function Round ("C",2), Access still stores "C" as a 4 decimal number. I have tried in my table to format "C" as a Fixed 2 decimal number but when I am clicking on it, it still gives a 4 decimal number.

Any idea how to resolve this?

Thanks

Daniel

MStef
06-02-2008, 01:54 AM
Try this, In field C Control Source properties put;
=Ronund(([A] * [B]);2)

DCrake
06-02-2008, 04:11 AM
To correct the previous thread, syntactically it should have read

Round([A]*[B],2)

Note it is a comma, not a semi colon.

CodeMaster::cool:

ErikSnoek
06-02-2008, 04:33 AM
To correct the previous thread, syntactically it should have read

Round([A]*[b],2)

Note it is a comma, not a semi colon.

CodeMaster::cool:
Actually, it should be a semi-colon like MStef said. In VBA code it's a comma but MStef told OP to put it in the Control Source property.

DCrake
06-02-2008, 04:58 AM
Very, very rare I use bound forms but

=Ronund(([A] * [b]);2)

Seems syntactically incorrect Ronund - should this be Round:confused:

The use of BoDMaS in this example is not needed :(

And when tried my self on a makeshift test the semi colon raised an error:eek:

CodeMaster::cool:

DCrake
06-02-2008, 05:08 AM
Very, very rare I use bound forms but

=Ronund(([A] * [b]);2)

Seems syntactically incorrect Ronund - should this be Round:confused:

The use of BoDMaS in this example is not needed :(

And when tried my self on a makeshift test the semi colon raised an error:eek:

See attachment

When I used my syntax no errors:)

CodeMaster::cool:

Danielf
06-02-2008, 07:52 AM
Thanks,

I will try it.

Daniel