Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rewrite code
Message
De
20/06/2006 04:34:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01130156
Message ID:
01130166
Vues:
15
hi,
thank you very much,
but still i have another problem , if my choice is q2, i need to change flag1 to 2,..q3 flag1 must be=3...etc
thanks.
>
>LOCAL lnFor
>thisform.text42.Value = thisform.list1.value
>CLOSE all
>SELECT 0
>USE dnc
>FOR lnFor  1 TO 15
>    IF thisform.text42.Value = [Q]+TRANSFORM(lnFor)
>       LOCATE FOR flag1=1
>       ThisForm.Label1.Caption = q1
>       ThisForm.Label2.Caption = q11
>       EXIT
>    ENDIF
>NEXT
>CLOSE all
>USE answers
>
>
>>hi all,
>>
>>i need help to rewrite this code under(another way),
>>
>> lcKeyField = thisform.list1.value
>>         thisform.text42.Value= lcKeyField
>>      if  thisform.text42.Value = UPPER("q1")
>>           CLOSE all
>>           USE dnc IN 0
>>           SELECT dnc
>>        LOCATE FOR flag1=1
>>        ThisForm.Label1.Caption = q1
>>        ThisForm.Label2.Caption = q11
>>        ELSE
>>           USE dnc IN 0
>>           SELECT dnc
>>    if  thisform.text42.Value = UPPER("q2")
>>        LOCATE FOR flag1=2
>>        ThisForm.Label1.Caption = dnc.q1
>>        ThisForm.Label2.Caption = dnc.q11
>>    ELSE
>>        CLOSE all
>>           USE dnc IN 0
>>           SELECT dnc
>>    if  thisform.text42.Value = UPPER("q3")
>>        LOCATE FOR flag1=3
>>        ThisForm.Label1.Caption = dnc.q1
>>        ThisForm.Label2.Caption = dnc.q11
>>    ELSE
>>       CLOSE all
>>           USE dnc IN 0
>>           SELECT dnc
>>    if  thisform.text42.Value = UPPER("q4")
>>        LOCATE FOR flag1=4
>>        ...
>>        ...
>>        .
>>        .
>>         CLOSE all
>>           USE dnc IN 0
>>           SELECT dnc
>>          if  thisform.text42.Value = UPPER("q15")
>>        LOCATE FOR flag1=15
>>        .
>>        .
>>        .
>>
>>ENDIF
>>ENDIF
>>ENDIF
>>ENDIF
>>
>> CLOSE all
>>USE answers IN 0
>>Select answers
>>
>>
>>thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform