In my MS Access continuous form I have two text boxes, TextBox1 and TextBox2. In TextBox1 I get the value from a table field of database and in TextBox2 I want to show the value of the first textbox and I want to do it using VBA program.
What I am currently doing, on form load
Private Sub Form_Load()
Dim val As String
val = Me.TextBox1
TextBox2.Value = val
End Sub
But this show only the first element of the TextBox1 value in all TextBox2 value. TextBox2 value do not change with the change of TextBox1 value.
For example, Currently my output is like this
TextBox1 TextBox2
Tom Tom
Tommy Tom
Sam Tom
Sammy Tom
But I want the output like this
TextBox1 TextBox2
Tom Tom
Tommy Tommy
Sam Sam
Sammy Sammy
That is I want to take the value of TextBox1 and put it in TextBox2 dynamically and I want to do it using code builder.
I want to do it using vba code. Because I have to do lot of calculation on the value of TextBox1 and then show a result in TextBox2. How can I do this?