A database has been Uploaded to
http://www.whathappenedwhen.co.uk/access/version1.htmso you can download it (the database has has been stripped of most of its tables/forms/querys) zipped
Scene: (Based on DiverID 26)
The database is used to add persons details(name, address, etc..) and purchases (tshirts, equipment, courses etc..) to the db.
When you open "frmDivers" you will be presented with all their information,
their is a button called "Take Payment" - click!
You will be presented with a popup box(frmtakepayment) that contains info like "payment method" "currency" "rate" and "amount due"
The Problem:
on load of this form i would like the "Amount Due" to display the Amount..ie "78.00"
Example:
The Person first selects "Payment method" ie "Cash, credit card, cheque"
they then select "currency" ie "US Dollar, Sterling, Euro, Egyptian pound"
this automatically show the exchange rate in the "Rate" txtbox ie "1.194"
So if on load of "frmtakepayment" the payment amout due was "78.00" (Euro is the local currency" and then the user selected the payment method "CASH" and Currency "US Dollar"
i would want the amount due "78.00" x "1.194" (US Dollar exchange rate)
so the total would be $93.13, but i want to be able to take out the "93.13" and type in my own figure ie "$10.00" this would get saved into a table called "tblpayments" along with all the other details, payment method, currency, rate.
but their is also another field in "tblpayments" called "Payment Amount" which would contain the Euro Value of $10.00 ($10.00 / 1.194(US Dollar exchange rate) = 8.37)
so next time when the customer comes back to pay for his bill we know that he has already paid 8.37,
Two queries have already been written to calculate this (payments and purchases) but only payments will need to be used on this form as it looks in purchases.
Any questions?
you need to download the db to understand the workings!
[Anyone who manages to solve this problem and email it back to me (see website)will be awarded 1000 POINTS!!!!]
-
David
Merry Christmas