VBA - How can I position the cursor in an AfterUpdate event routine?
have a need to position the cursor at the end of the text in a text box (TB1) on a simple form after processing the user's input into the control.
I have used the code (below) to try to do this:
Me.TB1.SelStart = Len(Me.TB1.Text)
This code works in the Click event for the text box but if I use it in the AfterUpdate event, where I need it, the focus shifts to the next tab stop (control). I want the cursor to be at the end of the user's input text.
Can someone enlighten me as to what the difference in behaviour between the Click and AfterUpdate events is ans suggets how I can achieve my aim?
I am using Access 365 VBA.
Thanks in advance.
I found an application property (MoveAfterReturn) which seems to do what I want but, although it is available in Word, it is not in Access.
Be the first to answer this question.