SET EXACT ON IF SEEK(ALLTRIM(thisform.txtCusno.Value),"CUSMAS") thisform.txtCusname.Value = cusmas->cusname ELSE IF EMPTY(thisform.txtCusno.Value) MESSAGEBOX("You must enter client code!",48,"Warning") ELSE MESSAGEBOX("Client code not exist!",48,"Warning") ENDIF thisform.txtCusname.Value = " " thisform.txtCusno.SetFocus() ENDIFWhen user press TAB to bypass the input, I find that thisform.txtCusno.SetFocus() does not work. I try to put this checking into the VALID event, but the VALID event does not allow the setfocus statement.