473,738 Members | 11,146 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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!txtLocalValu e = 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 6444
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It would seem you need a table like this:

ExchangeRates:
NationalCurrenc y Text(7)
ValueOneUSD Currency
Effective Date

The data would look like this:

NationalCurrenc y 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 NationalCurrenc ies 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 NationalCurrenc y = ER.NationalCurr ency )
AND NationalCurrenc y = "JPY"

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

Then you'd have to get the query return value "CurrentRat e" & 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/AwUBP8edZoechKq OuFEgEQLSygCgis c4Hf3CuhoR2IkPp ex+ZNz9nv0AoLRp
xuhiCiljzOr3aPb PjN3+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!txtLocalValu e = 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*********@yah oo.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
1850
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 would like to have prices in say pounds & euros. Is there a site that my website can connect to, to retrieve the current daily exchange rate.
6
2632
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 address. is "My Custom Name" Jason@Yahoo.com. When the email was received into my companies Exchange 5.5 mail system the custom name was kept intact. Now that
3
710
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 go/surf by using IE. I found on the internet how to do that by launching own instance of IE (new InternetExplorer()...) and then with the help of events in shdocvw.dll I can see where the user is
1
1623
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 components are totally free and royalty free for commercial and non-commercial applications. So, developers can download the component and use it whereever they want. Can you help us to find the appropriate license
7
4069
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 return the new amount in the needed currency, I need this function to work real time (obtaining real time currency exchange rates), any ideas???
0
1931
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 complete. I'm trying to have the application send an email to the next person upon task completion. I looked over the info concerning emailing and Access at Tony Toews' site (thanks for that, Tony). I finally came up with some Visual Basic code...
5
2311
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 System.CodeDom.CodeCastExpression) __problem typecast #1 Desc:i do needed checks but data/commands in XML is dynamic and i don't wanna fix C# code again and again... Sample:foreach (object some in somearray) (some.GetType())some.someaction();
2
6328
by: katara | last post by:
how can i find out the growth rate of table, oracle 8 os window abhi
2
1600
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 currency rate I buy in, so that I can later make "sum" calculations etc. Please also note that there are several suppliers for each component and so I maybuy component1 in $, component 2 in € and so on. How can I input either $ or € or whatever...
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8788
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8210
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.