Hello, I am trying to write a macro that will allow me to display the IRR of a series of cash flows in a text box on a form in Access 2010. The cash flows are also in individual text boxes that are all calculated controls. My initial script was
Private Sun
Static Values(10) As Double
Value(0) = Me.Text1
Value(1) = Me.Text2
Value(2) = Me.Text3
Value(3) = Me.Text4
Value(4) = Me.Text5
Value(5) = Me.Text6
Values(6) = Me.Text7
Values(7) = Me.Text8
Value(8) = Me.Text9
Value(9) = Me.Text10
Value(10) = Me.Text11
Me.Text12 = IRR(Values))
End Sub
If Im lucky there is only an error in the text box 12, but usually this ends up erroring out all my other text boxes that are calculated controls. any Ideas?
Private Sun
Static Values(10) As Double
Value(0) = Me.Text1
Value(1) = Me.Text2
Value(2) = Me.Text3
Value(3) = Me.Text4
Value(4) = Me.Text5
Value(5) = Me.Text6
Values(6) = Me.Text7
Values(7) = Me.Text8
Value(8) = Me.Text9
Value(9) = Me.Text10
Value(10) = Me.Text11
Me.Text12 = IRR(Values))
End Sub
If Im lucky there is only an error in the text box 12, but usually this ends up erroring out all my other text boxes that are calculated controls. any Ideas?