Add
NODEFAULT
to prevent focus from moving to the next control.
>
> I have a form that contains the textbox - textbox1. In the lostfocus method, I have this code:
>
>local llok, lctext
>lctext = alltrim(this.value)
>thisform.moverlists1.lstSelected.ADDITEM(lctext)
>thisform.textbox1.setfocus()
>this.value = ""
>thisform.refresh()
>*!* thisform.textbox1.setfocus()
>
>I had the setfocus after the this.value = "" and the textbox is not getting the focus.
> Yes, I am aware that at this moment, the user would never be able to get out of the box. I will fix that somehow. But I need the focus to go to the textbox and show a cursor until the user pushes one of two buttons.
>
>Thanks for your help.
>Beth
--sb--