Hi, Sergey
I don't use the valid, because it comes up and says that you can't use setfocus in that method.
>>Beth,
>>
>>You should issue NODEFAULT when you want to keep focus only.
>>
IF THISFORM.ltextbox = .T.
>> THISFORM.textbox1.SETFOCUS()
>> NODEFAULT
>>ENDIF
>>THIS.VALUE = ""
>>THISFORM.REFRESH()
>>
Why don't you use VALID() of the textbox?
>
>>>Yesterday, I had a question on the lostfocus of a textbox, and Sergey quickly gave me the answer. Now, I am working on the second part of my form now. Where I need the user to be able to click into the lstSelected listbox of a moverlist, to select a record to be move out of that list. I can not get the listbox to have the focus. I put code in the click method of that listbox:
>>>
>>> Thisform.ltextbox = .F.
>>>
>>>This form property is suppose to (MWOT) allow the lostfocus of the textbox1 to not set the focus back to itself. It's code is:
>>>
>>>LOCAL llok, lctext
>>>lctext = ALLTRIM(THIS.VALUE)
>>>IF !EMPTY(lctext)
>>> THISFORM.moverlists1.lstSelected.ADDITEM(lctext)
>>>ENDIF
>>>IF THISFORM.ltextbox = .T.
>>> THISFORM.textbox1.SETFOCUS()
>>>ENDIF
>>>THIS.VALUE = ""
>>>THISFORM.REFRESH()
>>>NODEFAULT
>>>
>>>
>>>And I don't know how to set the property back to .T., if the user clicks back into the textbox, if I every get them out of the textbox1. Anyone got some ideas on how I can do this??