473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

find appropriate exchange currency rate

New to access, but to deja.com. Looked through many posts, but can not
find a good post for my problem (I believe there is, but my access
level didn't allow me to understand).
I have a table for cash flow of a shop. Forreign currencies are
accepted. I built the tables accordingly: CURRENCY TYPE (USD, EURO,
POUND ETC), AMOUNT OF THE CURRENCY. RATE FOR LOCAL CURRENCY and LOCAL
CURRENCY VALUE.

When I entered the type of currency (eg USD), I want the table (or
form) to find the correct rate from other table (where I stored the
exchange rates) and show it in appropriate txtbox (then I use that for
the calculation). If it must be through VBA code, I tried
Me!txtLocalValue = Me!ForCurrency * Me!Rate

If I have a fixed rate, no problem, but since I have variable rates, I
failed.

I hope it is clear enough what I need.

Any help is very much appreciated

Regards,
Baybars
Nov 12 '05 #1
2 6415
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It would seem you need a table like this:

ExchangeRates:
NationalCurrency Text(7)
ValueOneUSD Currency
Effective Date

The data would look like this:

NationalCurrency ValueOneUSD Effective
JPY 110 2/5/2003
JPY 112 2/8/2003
GBP 0.60 2/3/2003
GBP 0.62 2/7/2003

The ValueOneUSD would be the number of NationalCurrencies need to
equal one US dollar. The Effective date would be necessary to tell
what the exchange rate was for past transactions.

To get the exchange rate you'd have to query the ExchangeRates table.
E.g.: We want to know what the current USD value is for 200 JPY.

SELECT 200/ValueOneUSD As CurrentRate
FROM ExchangeRates AS ER
WHERE Effective = (SELECT Max(Effective) FROM ExchangeRates
WHERE Effective <= Date()
AND NationalCurrency = ER.NationalCurrency )
AND NationalCurrency = "JPY"

Say the value of "ValueOneUSD" was 110: 200 / 110 = 1.8182 USD

Then you'd have to get the query return value "CurrentRate" & put it
into a form control.

HTH,

- --
MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP8edZoechKqOuFEgEQLSygCgisc4Hf3CuhoR2IkPpex+ZN z9nv0AoLRp
xuhiCiljzOr3aPbPjN3+wdS2
=ZAX7
-----END PGP SIGNATURE-----

Baybars wrote:
New to access, but to deja.com. Looked through many posts, but can not
find a good post for my problem (I believe there is, but my access
level didn't allow me to understand).
I have a table for cash flow of a shop. Forreign currencies are
accepted. I built the tables accordingly: CURRENCY TYPE (USD, EURO,
POUND ETC), AMOUNT OF THE CURRENCY. RATE FOR LOCAL CURRENCY and LOCAL
CURRENCY VALUE.

When I entered the type of currency (eg USD), I want the table (or
form) to find the correct rate from other table (where I stored the
exchange rates) and show it in appropriate txtbox (then I use that for
the calculation). If it must be through VBA code, I tried
Me!txtLocalValue = Me!ForCurrency * Me!Rate

If I have a fixed rate, no problem, but since I have variable rates, I
failed.

I hope it is clear enough what I need.

Any help is very much appreciated

Regards,
Baybars


Nov 12 '05 #2
On 28 Nov 2003 06:20:04 -0800, ba*********@yahoo.com (Baybars) wrote:
I have a table for cash flow of a shop. Forreign currencies are
accepted. I built the tables accordingly: CURRENCY TYPE (USD, EURO,
POUND ETC), AMOUNT OF THE CURRENCY. RATE FOR LOCAL CURRENCY and LOCAL
CURRENCY VALUE.

When I entered the type of currency (eg USD), I want the table (or
form) to find the correct rate from other table (where I stored the
exchange rates)


Are you sure you want to do that? How stable are your exchange rates?
How stable are they in the worst case?

--
Mike Sherrill
Information Management Systems
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andie | last post by:
Hello All, I am writing a script than connects to my database and pulls prices in pounds, does anyone know how I can get the current exchange rate so I can have a dual currency on my site. I...
6
by: Jason | last post by:
Sorry for the post here but could not find an Exchange newgroup. I developed an application a year or 2 ago that sends SMTP email. The application allows the user to customize the text from...
3
by: BK | last post by:
Hi all! I am a total newbie on this stuff and I am probably asking for an answer for very stupid (simple) problem. Well.. I would like to write a C# application that checks URLs where user...
1
by: David | last post by:
we are a group of developer, our intention is to developer free Microsoft ..NET components Initially source code is not available, so we are trying to find the appropriate license. All...
7
by: meenasamy | last post by:
Hi all, i need to create a function that takes three parameters( Original currency, needed currency, amount) i need to convert from the original currency to the needed currency the amount and...
0
by: Alan | last post by:
Hello World: I'm trying to build an application (using Access 2003) that will allow users who have to perform tasks in a particular order, to notify the next person in line when their task is...
5
by: SunnyDrake | last post by:
HI! I wrting some program part of it is XML config parser which contains some commands(for flexibility of engenie). how do i more simple(if it possible not via System.Reflection or...
2
by: katara | last post by:
how can i find out the growth rate of table, oracle 8 os window abhi
2
by: ptoussis | last post by:
Hello, I am producing a product which consists of say 3 components(they are many more). I buy these components some times in $ some others in € or whatever. I want to store these prices and the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.