Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remind me how, please?
Message
 
 
À
27/10/2008 14:46:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01357393
Message ID:
01357502
Vues:
20
>>Got a date range, and if the Beginning Date is empty, but the user puts a something in the End Date, I need to display an error message and put the focus back in the Beginning date.
>>
>>So, someone please remind me how to do that?
>>
>>Thanks
>
>It seems folks do not use Foxpro too often anymore.
>Firstly, you should use txtEndDate.Lostfocus event. If you want trigger it just in case user actually typed something then flank the tag in both Gotfocus and Lostfocus event. Use Setfocus with Nodefault to return focus to the box.
>
>*** txtEndDate.Gotfocus
>This.Tag=Dtos(This.Value)
>*** txtEndDate.Lostfocus
>If This.tag==Dtos(This.value)  && no entry
>  Return
>Endif
>If Not Empty(This.Parent.txtBeginDate)  && no action
>  Return
>Endif
>=Messagebox("My Message")
>This.Parent.txtBeginDate.Setfocus
>Nodefault
>
Checking for the Esc key would be nice, too, so the user doesn't get trapped in the field.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform