Solved

# Doing currency Conversion and calculating Accrued Interest in a query

Posted on 2007-03-26
440 Views
I do collection work for creditors in the UK who have clients in the US.
I have a database where the debtor has been invoiced in £GBP which I convert to \$USD on the day of invoicing.  When we receive payments from the debtor I need to convert it to £GBP based on the conversion rate that day.  In addition I have to track interest due on the account.  Presently the currency conversion and interest calculation is being done in an Excel spreadsheet and then entered back in Access.

Is there a way to design a query that will do an accrued interest calculation which is based on the intrerest rate, date of last payment to the date of current payment
0
• 3

LVL 9

Expert Comment

You want to calculate the interest compounded on a daily basis?

If not, it is just a wee DateDiff("d", [LastDate], [ThisDate] to calculate the number of days (+ 1 if inclusive of the first day) and multiply this my the Daily interest rate (AnnualRate/365.25) and the Amount... I think...
0

LVL 84

Accepted Solution

Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
I'm sure you could build a routine which did this, or perhaps even in a query. How exactly do you calculate this now? I'd assume something like:

(Amount Originally Owed) - (Payments Made) + Interest Charged

However compounding interest can be pretty complex, depending on the specific rules of your government and/or company or customers. If the Excel functions give you correct results, then you _could_ make a reference to Excel and use the formulas there to do the work for you.
0

LVL 9

Expert Comment

You want to calculate the interest compounded on a daily basis?

If not, it is just a wee DateDiff("d", [LastDate], [ThisDate] to calculate the number of days (+ 1 if inclusive of the first day) and multiply this my the Daily interest rate (AnnualRate/365.25) and the Amount... I think...
0

LVL 9

Expert Comment

If you wanted it compounded by the day, then I think the field would be:

[OrginalAmount] + ([OriginalAmount] * ((1 + [DailyInterestRate]) ^ DateDiff("d", [DateFrom], [DateTo]))

(^ is 'ToThePowerOf')
0

## Featured Post

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…