Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lookup on the form
Message
De
06/02/2006 15:29:06
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01094102
Message ID:
01094106
Vues:
9
I would lean towards making the maximum allowable characters in the textbox 3, and then putting the code to lookup & display this value in the lost focus of the textbox. Of course, if you have code in the .valid() that returns .f., then focus will not be lost and this event will not occur. If that is manageable in your situation, it seems like a simple place to put it.

Alternatively, put it right in the keypress & check the len(alltrim(yourtextbox.value)) on each keypress and if it's 3, then do the work in the keypress. When coding in the keypress, I know you always have to watch your behaviors as you type and perhaps add the appropriate NODEFAULT or DODEFAULT() commands to restore 'normal' behavior after having tampered with it.


>Hi All,
>
>I have a text box on a form that will be used to enter the 3 characters airport code in order to lookup the airport location. What I would like to do is as soon as the 3rd character is entered into the text box to automatically show the airport name as a label. How would you initiate the action without using lets say the command button, as soon as the 3rd character is entered ?
>
>TIA ,
>Daniel
Paul A. Busbey
Victoria Insurance
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform