list box will only show currency to two decimal places

T

tom

I have a list box set up just as I want it except I cannot
get it to show currency to more than two decimal
places. The data in the list box is based on a query.
The query will show currency to four decimal places
but the list box will not.
 
J

JK

Tom,

In the *query* create a calculated field
fmtCurr: Format([YrCurrencyField],"#,##0.0000")

use that field in your list box

Regards/JK
 
G

Guest

Currency by definition is two decimal places. Internally it's stored as
double. So if you use your own formatting you can display it any way you
want. Think of Currency as a special formatting property for double. In
general it's a good idea to not use Currency data type.
 
J

Jamie Collins

Merle said:
Currency by definition is two decimal places.

Whether you are talking about real life currency or Access/Jet's
CURRENCY data type (SQL keyword in uppercase) you are incorrect.

Most jurisdictions quote their currencies to at least four decimal
places. See:

http://newsvote.bbc.co.uk/1/shared/fds/hi/business/market_data/currency/default.stm

The Access/Jet CURRENCY data type is fixed at four decimal places.
Internally it's stored as
double. So if you use your own formatting you can display it any way you
want. Think of Currency as a special formatting property for double.

This is a misstatement. The Access/Jet CURRENCY data type is not the
same as Double (DOUBLE PRECISION).

Double is floating point in nature, called an 'approximate numeric
type' in the SQL-92 standard. Its inexact nature makes it very
unsuitable, possibly illegal, for monetary data. Check with your
auditor <g>.

CURRENCY is an exact numeric type, has fixed scale and precision and is
internally is a scaled integer. The SQL-92 standard does not have a
CURRENCY or other monetary data type.

Jamie.

--
 
J

JK

Jamie,

Just a comment.

There is a difference between currency sub-division (i.e. 100 cents in $1)
and exchange rate. The subdivision can be 0-3 decimal, see here:
http://fx.sauder.ubc.ca/currency_table.html

Officially, Currency exchange rate uses (but not necessarily quoted) 6
"significant digits" meaning the total non zero digits to the left and right
of the decimal point, *irrespective* of the sub-division. You can see it in
your example - compare Australian Dollar, Taiwanese Dollar and Indonesian
Rupia.

Regards
Jacob
 
J

Jamie Collins

JK said:
Just a comment.

There is a difference between currency sub-division (i.e. 100 cents in $1)
and exchange rate. The subdivision can be 0-3 decimal, see here:
http://fx.sauder.ubc.ca/currency_table.html

Officially, Currency exchange rate uses (but not necessarily quoted) 6
"significant digits" meaning the total non zero digits to the left and right
of the decimal point, *irrespective* of the sub-division. You can see it in
your example - compare Australian Dollar, Taiwanese Dollar and Indonesian
Rupia.

Yep, I suck at defending the name of this data type <g>. To me, a
'currency' column would be ISO 4217 codes i.e. used to model the
monetary 'unit of measure' rather than the value itself. Exchange rate
is my best guess but admittedly is a bit of a red herring; other
monetary values are required to a scale greater than two decimal places
(certainly greater precision than six significant figures <g>).

Jamie.

--
 

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