>>Instead isn't it easier moving THISFORM.cbNext.SetFocus to lostfocus of this. Or are you trying this control also lose focus when LEN(TRIM(THIS.text)) = len(this.inputmask) ?
>>Cetin
>
>The problem is if the user goes back to THIS and then clicks on another control or uses up-arrow, Shift+Tab, etc to change the focus, his focus will automatically go to THISFORM.cbNext.
>
>Werner
Yes,
But in lostfocus you could trap it :
#define shifttab ???
#define uparrow ???
if !inlist(lastkey(),shifttab,uparrow) and !mdown()
nodefault
thisform.cbNext.setfocus()
endif
Cetin