>>>I have a textbox2 which never receives the focus when textbox1 explicitly says thisform.mytextbox2.setfocus in several of its events.
>>>instead, a cmdbutton gets the focus. I have even blanked out all of textbox2's events. I have to actually place the cursor manually with the mouse into textbox2 to give it the focus.
>>
>I put NODEFAULT in the keypress of mytextbox1 so no mytextbox2 receives the focus like I intended. Why does all the "thisform.mytextbox2.setfocus" in the World have no effect then?
Why you put NODEFAULT in the keypress, I don't know. It's not my business probably :). However, if you want to move focus to particular control, then you should issue :
ThisForm.Control.Setfocus
NODEFAULT
'Usually, it works'.
Edward Pikman
Independent Consultant