Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I get back to a previous text box if error occurr
Message
 
À
05/01/2000 14:31:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00313407
Message ID:
00313627
Vues:
39
>I think this is a simple question but I am having trouble figuring it out. Here is my question...
>I have a text box on a form. After the user enters data the valid checks the data. If the valid determines it has invalid data, I want the focus to go back to the field with the invalid data and not move on to the next text box. In Version 2.6 we used to use the _CUROBJ command to move the focus to the previous text box. In Version 5.0 how do I do this? I tried using the SetFocus command but it said that it is read only. Read only? I checked the properties for this object and it's not set to read only...
>If anyone has suggestions, any will help...
>Thanks, Mike.

Mike,

In version 2.6 you were doing this the hard way also, simply RETURN 0 from the vlaid and focus stays in the same control. Antoher way is to RETURN .F. from the valid, but this one will also display the error messge for the control, whihc by default is "Invalid Data" (not very friendly). I prefer displaying the message myself and using RETURN 0
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform