Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making Date Entry Required ??
Message
 
 
À
17/05/2006 23:00:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
01123023
Message ID:
01123092
Vues:
45
>Thanks for the advice. I've got the PreSaveHook working but I'm still having problems with the VALID.
>
>I put the following code in the VALID method and thought it would prevent
>the focus from changing to the next field/control until data was added to
>the "UnitNo" textbox. However, the textbox still looses focus. Any
>suggestions on how to keep the focus locked on the textbox until data is
>input.
>
>I also replaced the RETURN with a .setfocus command but got an error that
>this was not allowed in a VALID method.
>
>
>IF EMPTY(ALLTRIM(thisform.txtEmergency_UnitNo.Value))
>   WAIT WINDOW "Unit Number is Required for ALL Emergency Orders!" TIMEOUT 2
>   RETURN
>ENDIF
>
>

Instead of RETURN, use RETURN 0 <g>

Also you may need to add some logic to be able to get out of the field if you press on Cancel button or try to close the form. Otherwise you would be stack in the field. I have code at work to do so.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform