Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validating Entries In A TextBox
Message
 
 
À
17/10/2001 11:43:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00569648
Message ID:
00569885
Vues:
14
>To All:
>Please recommend ways of checking a TextBox to see if it is empty or also that it contains only Alpha characters. The code should then post a MessageBox telling the operator that the field cannot be blank or some character is invalid. Then the cursor should return to the same field to allow correction of the problem. I tried using the Valid event but it pops a nasty little wait window that I would rather not see. I will use this code to check each Textbox on the form.

Eric,

You can use A in Format property for this textbox and you can check in valid for empty value. Return 0, if it's empty and show your own messagebox here.

I usually do checks in both places: at the textbox level and at the Save method, if I need to provide unique value in a field (not autogenerated).
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform