>Gilles,
>
>The reason you see the behavior you do is that a toolbar NEVER gets focus, so the textbox never loses focus. The controlsource is updated by the textbox after its valid fires, which occurs when it loses focus. Since in hasn't lost focus it hasn't updated its controlsource. The solution is to get VFP to make the textbox lose focus. You can do this by setting focus to the same textbox with code like this at the beginning of the toolbar button's code.
>
>
>IF TYPE("_screen.ActiveForm.ActiverControl.Name") = "C"
> IF PEMSTATUS(_screen.ActiveForm.ActiveControl, "Setfocus",5)
> _screen.ActiveForm.ActiveControl.SetFocus()
> ENDIF
>ENDIF
>* The rest of your button code here
>
Thanks a lot !!!
Gilles