Hi All,
I have three tables
Expenses - Parent
LineItems - Child
Currency - Linked to the child with a drop down menu to select a currency
All works fine and I have a form to enter the information into. However I have a field in the LineItems table called HomeCurrency, I need to add some VBA behind the 'after update' event for when the actual cost is entered so that it looks up the exchange rate in the currency table then multiplies this with the cost and puts it into the HomeCurrency field in the LineItems table.
I know I shouldn't really do this and calculated fields are better done using queries, however I need to keep the historical conversion in the lineitems table, if I just use a query each time then it would be at the current exchange rate and not that what it was on the date the entry was made.
Hope that makes sense! Any help much appreciated.....I'm thinking I need a DLookup VBA expression but any help would be great
I have three tables
Expenses - Parent
LineItems - Child
Currency - Linked to the child with a drop down menu to select a currency
All works fine and I have a form to enter the information into. However I have a field in the LineItems table called HomeCurrency, I need to add some VBA behind the 'after update' event for when the actual cost is entered so that it looks up the exchange rate in the currency table then multiplies this with the cost and puts it into the HomeCurrency field in the LineItems table.
I know I shouldn't really do this and calculated fields are better done using queries, however I need to keep the historical conversion in the lineitems table, if I just use a query each time then it would be at the current exchange rate and not that what it was on the date the entry was made.
Hope that makes sense! Any help much appreciated.....I'm thinking I need a DLookup VBA expression but any help would be great