currency data type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have not worked with the currency values in MS Access before.
However now I find myself having to now include this information in a
database.
My question is simple, I assume I use the currency data type and not number.
Are there any quirks, hints, traps or tips anyone has with working with the
currency data type.

I will have to do calculations such as totals, differences, grand totals etc
for various recordsets and individual reocrds.

If there is nothing of note that springs to mind, ignore my post and thatnks
for reading.
I understand I have not posted a specific question, but thought I just might
canvass the subject before diving in and find out later that 'you should have
done XYZ ... everyone does that'. You feedback, time and experience is
appreciated.
 
Go ahead and use it. The currency type is reliable in all versions of
Access.

Internally, Currency is a fixed point number, i.e. it always has 4 decimal
places stored regardless of how the value is displayed. In Australia, that
equates to hundredths of a cent. If you are storing calculated results, you
may want to round to 2 places before storing so you don't get rounding
errors when totalling later.
 
Allen said:
Go ahead and use it. The currency type is reliable in all versions of
Access.

Another view is to write standard portable code. A successful database
won't stay in Access <g and duck>.

CURRENCY is Access only (SQL Server has a MONEY proprietary data type
which is seriously flawed). That's why I use DECIMAL(n,4).

Allen Browne famously doesn't like the DECIMAL data type. He mistakenly
thinks the flaw in the cursor engine, which means TOP N (again
proprietary syntax and uses a cursor) and ORDER BY (again is a cursor)
give wrong results, is a flaw in the data engine. Just as well he's
wrong because the data engine uses DECIMAL internally!
 
Back
Top