General information
Category:
Coding, syntax & commands
Title:
Subtract / advance code values
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only