Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remind me how, please?
Message
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:
01357430
Vues:
21
>Here is the chunk of code from the End Date LostFocus
>
>case !empty(this.value) and empty(thisform.txtBegDate.value)
> wait window "Range Must have a Begin Date"
> thisform.txtBegDate.SetFocus()
>
>the wait window will be replaced with the application Error Message, but right now I'm working outside of the app, just on the form.
>unfortunately, it's not setting focus back to txtBegDate

If you are doing it from LostFocus, then I think you need to return TRUE from the valid, otherwise Lostfocus won't get hit (I think).

>
>
>>I would recommend you use the lostfocus to do that. You can use something like:
>>
>>this.parent.txtdatebeg.setfocus()
>>
>>assuming the beginning date textbox sits on the form directly and is named txtdatebeg
>>
>>if you want to move focus back to that control from another control. You can check in the lostfocus of each control if beginning date is empty and ending date is not or vice versa and display your message and set focus where you need it using the control's setfocus(). You just cannot set focus from a valid. Is it a date or datetime field?
>>
>>
>>>That part I remembered, it's going FROM the End Date BACK to the Beginning Date that I can't remember how to do
>>>
>>>
>>>>In the VALID method of each of the textbox chech for an empty date, if empty return 0 to keep focus in that textbox
>>>>
>>>>>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
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform