redzombi19
Programmer
ok im still very new so please dont laugh,..... to hard.
ok the basid idea im trying to go with here is, i have a list of 5 cmd.buttons, and to start only 1 is visible.
when i click on one it launches a messagebox,when you choose yes, or no, the cmd.button disables itself and makes the next visible, it then deppending on the answer adds a 1 to either txt.box1 or txt.box2 on the form. which i have no problem with on the first cmd.button
but then in the next cmd.button i think i need to pass it a prameter of the variable i used in the first cmd.box,
and i cant for the life of me get this part correct!
i know its an easy thing to do but i have tried agin and agin and still no luck, so i figured id seek help before i went insane!!!
i have included below the code from cmd.box1, and cmd.box2, to help if my description was less than adequate
thanks guys.
CMD.BOX1:-------------
lnquestion1 = MESSAGEBOX ("bla, bla, bla?",4+32,"yada yada yada"
lncorrect = 0 && the variables i need to pass
lnwrong = 0 && as parameters
IF lnquestion1 = 6 && yes
lncorrect = lncorrect + 1
ENDIF
IF lnquestion1 = 7 && no
lnwrong = lnwrong + 1
ENDIF
thisform.txtcorrect.value = ALLTRIM(STR(lncorrect))
thisform.txtincorrect.Value = ALLTRIM(STR(lnwrong))
this.Enabled = .f.
thisform.cmdquestion2.visible = .t.
--------------
SO FAR SO GOOD, HERES WHARE I SCREW UP.
CMD.BOX2:-------------
lnquestion2 = MESSAGEBOX("YADA, YADA, YADA?",4+32,"bla, bla, bla"
IF lnquestion2 = 6 && yes
lncorrect = lncorrect + 1 && the part whare i fail
ENDIF
IF lnquestion2 = 7 && no
lnwrong = lnwrong + 1 && here too ;(
ENDIF
thisform.txtcorrect.value = ALLTRIM(STR(lncorrect))
thisform.txtincorrect.Value = ALLTRIM(STR(lnwrong))
this.Enabled = .f.
thisform.cmdquestion3.visible = .t.
---------------
so there you go, i hope i gave enough info, i greatly appriciate all your help!
ok the basid idea im trying to go with here is, i have a list of 5 cmd.buttons, and to start only 1 is visible.
when i click on one it launches a messagebox,when you choose yes, or no, the cmd.button disables itself and makes the next visible, it then deppending on the answer adds a 1 to either txt.box1 or txt.box2 on the form. which i have no problem with on the first cmd.button
but then in the next cmd.button i think i need to pass it a prameter of the variable i used in the first cmd.box,
and i cant for the life of me get this part correct!
i know its an easy thing to do but i have tried agin and agin and still no luck, so i figured id seek help before i went insane!!!
i have included below the code from cmd.box1, and cmd.box2, to help if my description was less than adequate
thanks guys.
CMD.BOX1:-------------
lnquestion1 = MESSAGEBOX ("bla, bla, bla?",4+32,"yada yada yada"
lncorrect = 0 && the variables i need to pass
lnwrong = 0 && as parameters
IF lnquestion1 = 6 && yes
lncorrect = lncorrect + 1
ENDIF
IF lnquestion1 = 7 && no
lnwrong = lnwrong + 1
ENDIF
thisform.txtcorrect.value = ALLTRIM(STR(lncorrect))
thisform.txtincorrect.Value = ALLTRIM(STR(lnwrong))
this.Enabled = .f.
thisform.cmdquestion2.visible = .t.
--------------
SO FAR SO GOOD, HERES WHARE I SCREW UP.
CMD.BOX2:-------------
lnquestion2 = MESSAGEBOX("YADA, YADA, YADA?",4+32,"bla, bla, bla"
IF lnquestion2 = 6 && yes
lncorrect = lncorrect + 1 && the part whare i fail
ENDIF
IF lnquestion2 = 7 && no
lnwrong = lnwrong + 1 && here too ;(
ENDIF
thisform.txtcorrect.value = ALLTRIM(STR(lncorrect))
thisform.txtincorrect.Value = ALLTRIM(STR(lnwrong))
this.Enabled = .f.
thisform.cmdquestion3.visible = .t.
---------------
so there you go, i hope i gave enough info, i greatly appriciate all your help!