Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 3.0 Newbie Question: LostFocus and SetFocus Methods
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00015402
Message ID:
00015403
Vues:
33
>I'm working on my very first VFP 3.0 application. In my Add/Edit/Delete Form, I am adding code to the LostFocus event of a date field to make sure the date entered/edited is within a certain range. If the date entered is not valid, a message box pops up informing the user of this. I then want the date data entry field to have the focus. However, the ThisForm.txtDate_of_Accident.Setfocus command does not work. I can substitute any other control name and it works fine.

If you are already on that control, you don't need to use the LostFocus() for validation. Use the Valid() event and RETURN 0 when it failed.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform