Calculated field problem

Rattlesnake

Registered User.
Local time
Today, 02:19
Joined
Sep 19, 2002
Messages
31
hi,
I have a subform in Access, which has a field which is a calculated field , but it is stored in the table.
Now Let me explain what i want to do...........
In a purchase order module,
-->The user selects a currency(like dollar,Euro etc) which is a part of the main form. It is a combobox which retrieves the conversion rate from the specifed currency to the Local currency.
-->The user then enters items in the subform. When the user enters the "UNIT COST" , i want it to get immediatley converted into its value in the Local currency using the value stored in the Currency combobox.

How can I do this?

Thanks in advance.
 
How about -

On the AFTERUPDATE property on the UNITCOST field on the subform, put the following bit of code -


If Not IsNull(Forms!MainForm!Combo) Then
UnitCost =UnitCost*Forms!MainForm!Combo
End If


The If...just checks to see that the conversion has been selected before proceeding. If it isn't, it just leaves the value untouched. You could use this to display a msgbox to advise the user.

HTH

Dave Eyley
 

Users who are viewing this thread

Back
Top Bottom