BrotherBook
Registered User.
- Local time
- Today, 16:05
- Joined
- Jan 22, 2013
- Messages
- 43
Hi-
I've written VBA code to sum two fields in my form and save the information down into a third field. My variable where i calculate the information is working correctly, but the text box i am trying to save the value to always shows zero. All three fields are set up as doubles in order to capture the decimals.
MsgBox (CouponCalc) yields .0333 (.0033 + .02)
MsgBox (Me.Coupon.Value) yields 0
I've written VBA code to sum two fields in my form and save the information down into a third field. My variable where i calculate the information is working correctly, but the text box i am trying to save the value to always shows zero. All three fields are set up as doubles in order to capture the decimals.
Code:
Private Sub Spread_AfterUpdate()
Dim CouponCalc As Double
CouponCalc = Me.Cost_of_Funds.Value + Me.Spread.Value
MsgBox (CouponCalc)
Me.Coupon.Value = CouponCalc
MsgBox (Me.Coupon.Value)
End Sub
MsgBox (CouponCalc) yields .0333 (.0033 + .02)
MsgBox (Me.Coupon.Value) yields 0