Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Have to leave field before save will work??
Message
From
21/10/2009 13:29:50
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01429644
Message ID:
01430446
Views:
53
>I have a form that's using remote views.
>
>If I use is in a textbox and makes some changes, then clicks the save button I run a tableupdate()...which returns a .T.
>
>What's odd is that if I requery the view, the changes are not saved UNLESS the user has hit the TAB button and advanced out of the textbox where they made the changes. Seems like I've run across the before but I can't remember how I fixed it - any suggestions?
>
>Thanks!

Is your Save button on a toolbar? If so toolbars never get focus, so the textbox doesn't lose focus, so the view doesn't get teh changes made in the textbox. The code (off the top of my head) to force the activecontrol to lose focus is:
IF TYPE("_Screen..Activeform.activecontrol") = "O"
   _Screen..Activeform.activecontrol.SetFocus()
ENDIF
Of course I hardly ever get it right first time when using TYPE() and VARTYPE() so you need to ensure you get the correct syntax.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform