Currency calculations

S

Stephen

I have reports and forms which are based on queries
which calculate dollar amounts based on Qty, Unit Price,
Discount %, etc.

Sometimes my report shows calculations different by .01
penny.

How can I stop this from happening, and get the same
result each time I run the Report aor Form?

All fields are set to Currency, 2 decimal places in all
tables which are used and in all calculated fields in any
query.

Thanks!
 
T

Terry

Stephen,

I believe you are suffering from a rounding problem Even
though you have the controls set to display 2 decimal
positions Access actually stores an actual value and
displays it to 2 decimal positions. eg.

Value discount actual number displayed amount
20.55 5% 19.5225 19.52
21.52 5% 20.444 20.44

42.07 39.9665 39.97

As you can see there is apparantly a 1 cent discrepency.
To overcome this you will need to round all your
calculations to 2 decimal points. See help for round
function usage.

HTH

Terry
 
S

Stephen

Thanks Terry
-----Original Message-----
Stephen,

I believe you are suffering from a rounding problem Even
though you have the controls set to display 2 decimal
positions Access actually stores an actual value and
displays it to 2 decimal positions. eg.

Value discount actual number displayed amount
20.55 5% 19.5225 19.52
21.52 5% 20.444 20.44

42.07 39.9665 39.97

As you can see there is apparantly a 1 cent discrepency.
To overcome this you will need to round all your
calculations to 2 decimal points. See help for round
function usage.

HTH

Terry

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top