Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid & Error events
Message
 
À
05/06/1998 17:57:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00105397
Message ID:
00105408
Vues:
25
Hi Rafel,

>Now in VFP the lines are executed and return values per line so this is not possible, and besides, if your table's index is set as Primary, you get an error from the first line:

The concept is to trap this error from the form via an error handler. Check out the Form's error() method and AERROR() function to get the error. You may then display the error message to the user. You do not need to do SEEK(this.Value) in the Valid()

>as far as I've seen to keep the cursor in the same field, not even with an error routine that calls the objet's SetFocus event to force this.

You can use _SCREEN.ActiveForm.ActiveControl to get the current object and then set the focus to it. e.g.
IF _screen.ActiveForm.ActiveControl == 'O'
   _screen.ActiveForm.ActiveControl.SetFocus()
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform