Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change not TABLEUPDATEd if still in control
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00096991
Message ID:
00097130
Views:
20
>Inthe beginning of the code in the Save button put this ;
>
>
> IF PEMSTATUS("_SCREEN.Activeform.ActiveControl.SetFocus",5)
>    _SCREEN.ActiveForm.ActiveControl.SetFocus()
> ENDIF
>
>
>
>That will force the current control to loose and then regain focus thereby updating its controlsource.

Thanks Jim. That did the trick perfectly.

As a side note, and this is general FYI for all, I don't put any actual specific code in my toolbar buttons but in the form instead. For example, the cmdSave buttons .Click event calls a custom 'State Manager' object (term I got from an article) which uses PEMSTATUS to see if the ActiveForm has a SaveRec method and if so runs it. I also use the PEMSTATUS check for the method initially to determine the buttons .Enabled value. I have found this to be a very flexible approach to using the same toolbar class in all my forms.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform