>>>>I have a form with a navigation toolbar, when in textbox you insert something and don't press TAB or ENTER or click on a object of form, but you click on a btn of toolbar the pointer moves and inserted data in textbox will be lost.
>>>>This is all because the value of textbox goes in the field when lostfocus, with toolbar the focus isn't lost in textbox.
>>>>
>>>>How to force this process ?
>>>>
>>>>T.I.A.
>>>>
>>>>Dino
>>>
>>>
if type('_screen.activeform.activecontrol')= 'O' and ;
>>> !isnull(_screen.activeform.activecontrol)
>>> _screen.activeform.activecontrol.valid
>>>endif
Cetin
>>
>>Thenks Cetin,
>>
>>I try your code, put it in click event of my CmdNext button of toolbar, but the focus remain on textbox and its value doesn't replace the data field. So it doesn't work.
>
>Dino,
>It was the skeleton. You might need force the value, tableupdate, refresh etc :
>
if type('_screen.activeform.activecontrol')= 'O' and ;
> !isnull(_screen.activeform.activecontrol)
> with _screen.activeform.activecontrol
> .value=.value
> endwith
>* if CanLeaveRecord
> skip
> _screen.activeform.refresh
>endif
Cetin
Now the value is really aquired and it works !
Thanks a lot.