Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TableUpdate() Problem
Message
From
16/10/1998 08:32:00
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00147398
Message ID:
00147434
Views:
29
>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
Gilles Azria
-------------------------------------------------
http://www.profiledatabase.com
http://www.photoprofile.ch
Previous
Reply
Map
View

Click here to load this message in the networking platform