Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Have to leave field before save will work??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01429644
Message ID:
01430446
Vues:
52
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform