Code:
Private Sub cboCodeNumber_AfterUpdate() "<< This is the after update event of the combo box
Me.Text3 = Me.cboCodeNumber "<< this sets the value of the text box control "Text3" to the value of the combo box selection
Call Command14_Click ' << this executes the commands just like you had clicked the enter button.
End Sub
So after setting the value of Text3, the code execution jumps to the procedure "Command14_Click". after all of the commands in "Command14_Click" have been executed, the execution jumps back to the line after the Call, which is "End Sub". Just like entering in 111 and clicking "Enter".
---------------------------------------
(Instead of leaving the button control the default name, I would have named the button "btnEnter". Then the after update event would look like:
Code:
Private Sub cboCodeNumber_AfterUpdate()
Me.Text3 = Me.cboCodeNumber
Call btnEnter_Click
End Sub
Which tells you more: "Command14_Click" or "btnEnter_Click"??
I always tale the time to rename control to something meaningful.