Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rewrite code
Message
De
20/06/2006 03:35:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Rewrite code
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01130156
Message ID:
01130156
Vues:
54
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform