Procedure keypress If nkeycode=13 thisform.nmystatus = 13 endif thisform.nmystatus = 0 * if you want to force the control to VALID method just use: KEYBOARD CHR(13) endproc procedure valid if thisform.nmystatus = 13 endif if thisform.nmystatus = 0 return .f. endif endproc procedure errormessage if thisform.nmystatus = 0 return "oh oh, your status is 0" endif if thisform.nmystatus = 4 return "oh oh, your status is N" endif endproc procedure lostfocus if thisform.nmystatus = 13 thisform.combo3.setfocus endif endprocps: Notice that the execution of the each tasks should be made in it respective method..