Why don't you put some code in VALID ?
>>>Is there a way to assign code to the LostFocus of an object during runtime? I have a conditional statement that I want to use in the InteractiveChange method that would set the LostFocus to "NODEFAULT" or "" depending. Thanks!
>>>
>>>Regards, Renoir
>>
>>Can't you put this within an IF?
>>
>>
>>if This.lSomeProperty
>> NODEFAULT
>>endif
>>
>
>Not that I can see in my situation, which I'll explain in more detail since there may be another solution.
>
>Have a combobox and I'm limiting the number of characters they can type. Not a big deal using the InteractiveChange for that, but when they reach the end the native behavior is to exit the object. I want them to stay there. Again, not really a problem as I could just put NODEFAULT in the LostFocus based on the length of the DISPLAYVALUE. Except, that I only want to keep them there if the maximum length is reached while they are typing. If they exit normally - and the length is still at the max - I want to go to the next object (or whereever they click). If I base it on code in the LostFocus instead of the InteractiveChange they can never leave if the length is at the max. Shoud I be trapping keys in the LostFocus to do this?
>
>Renoir