Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This.setfocus in valid method
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00013655
Message ID:
00013731
Vues:
37
>>>to check for a duplicate code, i tried using this.setfocus in a valid method, but it doesn't seem to work.
>>>
>>>if !tableupdate()
>>> =messgebox('Duplicate code. Please reenter')
>>> this.setfocus()
>>>endif
>>>
>>>is there a better solution?
>>
>>Have you tried RETURN .F.?
>
>yes, but message "invalid entry" appears and not a kinder message "Duplicate code. Please Reenter"

Try return 0 ( a zero not an o)

This avoids the invalid entry wait window and does not let the focus shift from the control, even if you try clearing the form.

HTH
Todd Burstain, MD
infinitydoc@delphi.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform