Use Change
event and Text
property:
Private Sub textbox1_Change()
textbox2.Value = textbox1.Text
End Sub
We take .Text
property of source textbox, because .Value
is changed after the end of edition.
Question
i'm working on some VBA code for msaccess, basically i want to display the data i typed on textbox1 to textbox2. i have tried all the events available and it ain't work.
i have tried this
Private Sub input1_AfterUpdate()
output1.Value = input1.Value
End Sub
on key down and after update. it works on after update but i need to refresh the page before the inputs are loaded to textbox2.
what i need is realtime update, everytime i typed something on textbox1, it will display on textbox2, including the previous letters i typed.
thanks a lot guys, badly need a solution for this :(
Solution
Use Change
event and Text
property:
Private Sub textbox1_Change()
textbox2.Value = textbox1.Text
End Sub
We take .Text
property of source textbox, because .Value
is changed after the end of edition.