Using two currencies ?

T

TonyB

Hi,
I am using two currencies in an small Access order database. An item in a
product table has two prices £ and $. When a item is ordered I need to
choose which price to store in the order record and how to store it ?
On the enter order form I could have a checkbox to select say US not UK
prices, but I'm puzzled as to how to store the price in the table of orders
?
I presume the currency data type is fixed to be what ever your regional
settings are ?
Is there any way of changing the currency type record by record, or will I
need to store the price as a number, and save a field in the table to say
what currency it is ?
The aim is that the order records will storeand display £yy or $xx depending
on which currency price was selected when the order was input.
TIA
Tony
 
B

Brian

TonyB said:
Hi,
I am using two currencies in an small Access order database. An item in a
product table has two prices £ and $. When a item is ordered I need to
choose which price to store in the order record and how to store it ?
On the enter order form I could have a checkbox to select say US not UK
prices, but I'm puzzled as to how to store the price in the table of orders
?
I presume the currency data type is fixed to be what ever your regional
settings are ?
Is there any way of changing the currency type record by record, or will I
need to store the price as a number, and save a field in the table to say
what currency it is ?
The aim is that the order records will storeand display £yy or $xx depending
on which currency price was selected when the order was input.
TIA
Tony

The currency data type isn't fixed to be anything, it's just a decimal
number.

By all means store your prices in a field of type Currency, but you will
definitely need to have another field on your record to indicate the
currency of the price.

The data will not be "stored" with a currency symbol, this is merely a
display format: the data is just a number in the database. The display
format just happens to default to the format specified by your regional
settings, but you can use a different format in your forms and reports.
However, if you insist on always displaying the currency symbol in the
actual price control (as opposed to another control immediately to the left
of it) you're gonna need some code in various places (e.g. form current
event, after update event for the currency control), to update the control's
format property to show the appropriate symbol for each record. When I'm
doing multi-currency systems I generally use event sinks to maintain the
format property on form controls bound to currency fields, so as not to have
to add the same code in hundreds of places.

Is it a pain? You betcha, but then multi-currency databases are MUCH harder
work than single-currency.
 

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