문제

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 :(

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top