I have a form in Access 2007 (2002-2003 file format). On this form I have 1 combo box and two text boxes whose record sources are linked to a main table.
The functionality of this set up is this:
combo1: [YeartoBeBuilt_combo] txt1: [Cost_txtbox] text2: [YearofExpenditureCost_txt
What happens is when a user makes a Year selection in the combobox (year to be built), a calculation is peformed based on the year selected and the value entered for txt1(Cost). This calculation is returned to text2 (YearofExpenditureCost) and subsequently, the recordsource in the table is updated automatically.
I perform this procedure currently as an AfterUpdate() procedure in the YeartoBeBuilt combo box as such:
This works find and dandy but only after the Year to Be Built combo box has been reselected.
Private Sub YearToBeBuilt_AfterUpdate()
YearofExpenditureCost = Me.Cost * (1 + 0.031) ^ (Me.YearToBeBuilt - 2010)
In other words, if records in the form already have a year selected, the Calculation will not show up in the YearofExpenditureCost text box field. How do I tell the the form to refresh the calculated field so that one does not have to manually re-select the year to be built value?
Many thanks for the help!