Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Findout none empty textbox
Message
 
À
13/12/2006 23:20:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01177475
Message ID:
01177494
Vues:
11
>Dear Experts,
>
>I have 20 textboxes on form.
>only one textbox has data, all other 19 textbox are empty.
>
>Textbox name are text1---text20.
>
>How to findout which textbox is not empty?
>
>Pleaes help

If they are named Text1...Text20, then:
LOCAL lnFor, loTextBox
lnFor = 0
loTextBox = NULL
FOR lnFor =  1 TO 20
    WITH EVALUATE([thisform.Text]+TRANSFORM(lnFor))
         IF NOT EMPTY(.Value)
            loTextBox = EVALUATE([thisform.Text]+TRANSFORM(lnFor))
            EXIT
         ENDIF
    ENDWITH
NEXT
IF NOT ISNULL(loTextBox)
   WAIT WINDOW loTextBox.Name
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform