Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subtract / advance code values
Message
De
18/02/2009 01:09:51
Muthu Vel
Sty Company
Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Subtract / advance code values
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01382572
Message ID:
01382572
Vues:
133
I have create student.dbf having fileds with 1.GE 2. MBC 3.SC 4.YA 5.KA and entered the values for GE =20, MBC =15 SC=10 YA =5 KA 7.
all the fields are Integer type, and I have designed student.scx in that I have placed five text boxes namely 1.txtge 2.txtmbc 3.txtsc 4.txtya 5.txtka and one combo box and one command button. In initialisation event i have written code belwo
use student
thisform.txtge.value = GE
thisform.txtmbc.value = MBC
thisform.txtsc.value = SC
thisform.txtya.value = YA
thisform.txtKA.value = ka

thisform.combo1.additem("GE")
thisform.combo1.additem("MBC")
thisform.combo1.additem("SC")
thisform.combo1.additem("YA")
thisform.combo1.additem("KA")

I want two types of code
1. I have selelct combo1.value = "GE" or "MBC" or "SC" then go to the GE field first and subtract the value -1, if GE fields value = 0 then if combo1.value = "MBC" then go to the MBC field and subtract the value -1 else, if combo1.value = "SC" then go to the SC field and subtract the value -1.

2. But i have select combo1.value = "YA" " then first go to the YA field and subtract the value -1 else if I have select combo1.value = "KA" then go to the "KA" field and subtract the value -1. if 'YA" and "KA" fields value = 0 then go the "GE" fields , if "GE" field value = 0 then Message box there is no value.

can anyone give the solution How to write code?

Thanking you
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform