Hi Paul.
>>The focus, instead, remains on the command1, whose click event is fired by this code. Any idea of why it performs this way, and how I can get the focus where I want it?<<
it probably behaves this way because Command1 is the next object in the tab order on the form. Change your code like so to keep focus on the textbox:
if nKeyCode = 13
this.parent.command1.click()
NODEFAULT
Endif
Marcia