Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_Curobj in Vfp...Please help...
Message
De
29/07/1998 09:43:49
 
 
À
29/07/1998 09:25:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00122269
Message ID:
00122279
Vues:
16
>what is the equavalent command of curobj in Vfp and how to use it, I am working on a form and what i want to do is when i click the save button i want to create a validation where in if one input variable is empty it will display a message and the control or cursor will go back to the empty input variable. I have done this kind of validation in fpd 2.6 using _curobj and objnum.

Equivalent will be Setfocus method of control you want to go back to. One gotcha here, that this method will not work if you're trying to use it within another object's valid event. Has to be validated in form level. I suppose that's what you're doing, since you said after clicking save button. In your form's save button click() event put:
If Empty(Thisform.Txtbox1.Value)
  MessageBox('Txtbox1 needs to be entered.', 64, 'Invalid Input')
  Thisform.Txtbox1.Setfocus
  Return .f.
Endif
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform