I'm not sure of the easiest approach. Suggestions, please.
I am using Access as a 'report writer' to create reports out of data extracted from a mainframe db.
The mainframe data includes a name, a monthly account balance and the currency that the account balance is in (Euros, pesos, etc.).
After importing into Access, I need to convert the balances into US dollars.
I have created an Access table: tblExchangeRates with fields pkExchRateID, Currency (Euro, Peso, etc.), EffDateOfExchRate, and ExchRate.
The EffDateOfExchRate will always be the last day of the month as will the date of the account balance.
The tbl tblAcctBalances will have several hundred records for each month. Therefore, I need to 'match' the correct exchange rate with the correct date for the account balance and then multiply the exchange rate X the balance.
I have tried a "Switch" function but I don't know how to limit the exchange rate to the properly dated one. Perhaps a DLookup? (Have never used this before so explanation would be helpful.)
Ideas??
Thanks all for your input.
swtrader
-- The trouble with doing something right the first time is that no one appreciates how hard it was.
I am using Access as a 'report writer' to create reports out of data extracted from a mainframe db.
The mainframe data includes a name, a monthly account balance and the currency that the account balance is in (Euros, pesos, etc.).
After importing into Access, I need to convert the balances into US dollars.
I have created an Access table: tblExchangeRates with fields pkExchRateID, Currency (Euro, Peso, etc.), EffDateOfExchRate, and ExchRate.
The EffDateOfExchRate will always be the last day of the month as will the date of the account balance.
The tbl tblAcctBalances will have several hundred records for each month. Therefore, I need to 'match' the correct exchange rate with the correct date for the account balance and then multiply the exchange rate X the balance.
I have tried a "Switch" function but I don't know how to limit the exchange rate to the properly dated one. Perhaps a DLookup? (Have never used this before so explanation would be helpful.)
Ideas??
Thanks all for your input.
swtrader
-- The trouble with doing something right the first time is that no one appreciates how hard it was.