M
mklapp
Hello,
A form with 3 textboxes and a button and the code
below :
Private Sub TextBox2_Enter
fred()
end sub
Private Sub fred()
TextBox3.focus
End
Private Sub TextBox3_enter
console.writeline("Entering")
End
Private Sub TextBox3_Leave
console.writeline("Leaving")
end
Private Sub Button1_Click
TextBox2.focus
End
The intent here is to start with the focus in TextBox1
(no events), click the button. The button changes focus
to TextBox2. The Enter event calls a routine that also
shifts focus, this time to TextBox3.
I would expect the output to be:
Entering
Instead I am getting
Entering
Leaving
Entering
This seems wrong and is causing some issues. In
practice, tabbing to 'TextBox2' takes the place of the
button click, but the end result is the same, a Leave
event at the "wrong" time.
mklapp
A form with 3 textboxes and a button and the code
below :
Private Sub TextBox2_Enter
fred()
end sub
Private Sub fred()
TextBox3.focus
End
Private Sub TextBox3_enter
console.writeline("Entering")
End
Private Sub TextBox3_Leave
console.writeline("Leaving")
end
Private Sub Button1_Click
TextBox2.focus
End
The intent here is to start with the focus in TextBox1
(no events), click the button. The button changes focus
to TextBox2. The Enter event calls a routine that also
shifts focus, this time to TextBox3.
I would expect the output to be:
Entering
Instead I am getting
Entering
Leaving
Entering
This seems wrong and is causing some issues. In
practice, tabbing to 'TextBox2' takes the place of the
button click, but the end result is the same, a Leave
event at the "wrong" time.
mklapp