>If I use the keypress event to run code on nKeyCode = 13 the keystroke is performed in the next field entered. If the next object in the tab order is a command button, the click event is triggered. If I want to move the focus to a text box which is not next in the tab order using setfocus, on arriving in the desired field I get an unwanted "return" moving me into the next object in the tab order. I would be grateful for any help.
Try putting the NODEFAULT command in the KeyPress(). This will keep the internal VFP event from firing. Just manually set your focus then.
HTH,
Tom