View Full Version : Currency Conversion Issues...


MSUKevin
05-21-2001, 04:10 AM
I'm having problems getting this to work so I hope maybe some of you can help with this ...

I have a form that performs sales calculations. At the bottom of the form I have unbound text boxes that add the totals, figure the sales tax rate, give the toal due, and also make change from the dollar amount given for the sale. My question is this:

(1) I want to set up either a yes/no box or a option group that can be select when the customer is using foreign currency.

(2) When this happens I either want the original unbound text boxes mentioned above to convert to this new currency format, or I want those boxes to become unavailable and a new set of boxes become available for use with the conversion.

(3) I also need the change due to be given in US currency...

(4) The other task I wish to accomplish is to have a value calculated in an unbound text box transfered to a table for storage. If there is an easy code for this operation please inform.

I know this is a pretty big open-ended question but I have been racking my brain trying to think about how to get this to work and I've come up with squat. Also... I'm not much of a code writer so I'm at a disadvantage there as well!

Any suggestions would be greatly appreciated...

Something fun for a cheery Monday morning http://www.access-programmers.co.uk/ubb/smile.gif

Atomic Shrimp
05-21-2001, 06:43 AM
This may or may not be relevant to your question, but if your database is likely to be dealing with other currencies, I would treat everything as a converted currency, including your native currency (which you would convert at a rate of 1)

Pat Hartman
05-21-2001, 11:29 AM
You need a table to hold currency types and conversion factors. You also need to decide if you are doing point in time conversions or current value conversions. ie. Do you want the converted value as of the date of the transaction or as of today? If the former, you'll need to include effective date as part of the key and your conversion logic would need to find the currency entry with the date closest to but not greater than the transaction date in order to get the conversion factor.

The currency table could use currency name such as US Dollars, Pounds Sterling, Kuwaiti Dinars, etc. or a country name such as USA, UK, Kuwait.

MSUKevin
05-22-2001, 04:19 AM
Thanks for the help Pat. the currency table based on date is working just fine!!!

I appreciate the assistance http://www.access-programmers.co.uk/ubb/smile.gif