bast way to store currency values - payroll application

C

chris

Howdy,

What's the best way to handle currency storage?
Access stores Currency values with 4 digis precision.
So if you have 4 currency fields and you do a sum of
them using SQL, you will not neccessarily get the
expected result.

The way I see it, there's 2 ways:
1. Round the number to 2 decimal points before
sending it to the database. Would anyone advice against
this?

2. Store the number as is, and round it before showing it
on a form or report. This solution sounds very
inefficient to me.

Any advice would be greatly appreciated.

Chris
 
M

Mike Sherrill

What's the best way to handle currency storage?
[snip]

In the USA, pocket money (dollars and cents) has two digits to the
right of the decimal point. How many digits does your pocket money
have to the right of the decimal point?
The way I see it, there's 2 ways:
1. Round the number to 2 decimal points before
sending it to the database. Would anyone advice against
this?

Ah. I take this to mean *your* pocket money has two digits to the
right of the decimal point just like mine does. If that's the case,
you need a validation rule on the *column* to guard against excessive
digits. That validation rule, in turn, will require you to round to
two digits before storing the value.
 

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