>if thisform.text1.value=="123" or Alltrim(thisform.feeuser.value)=="khubaib" > feeuser=thisform.feeuser.value > Do Form frsptc > thisform.release > > Else > = Messagebox('not allowed', 32, product) > thisform.release > Return .T. > > >if ALLTRIM(thisform.text1.value)=="123" or Alltrim(thisform.feeuser.value)=="abid" > feeuser=thisform.feeuser.value > Do Form frsptc > thisform.release > > Else > = Messagebox('not true', 32, product) > thisform.release > Return .T. > ENDIF > ENDIFwhen you use OR, once the first condition is true the program will not bother with looking at the second condition.
if thisform.text1.value=="123" or Alltrim(thisform.feeuser.value)=="khubaib" feeuser=thisform.feeuser.value Do Form frsptc thisform.release Else if ALLTRIM(thisform.text1.value)=="123" or Alltrim(thisform.feeuser.value)=="abid" feeuser=thisform.feeuser.value Do Form frsptc thisform.release Else = Messagebox('not true', 32, product) thisform.release Return .T. Endif ENDIFthough I think it would be better to do:
if thisform.text1.value=="123" if Alltrim(thisform.feeuser.value)=="khubaib" or Alltrim(thisform.feeuser.value)=="abid" feeuser=thisform.feeuser.value Do Form frsptc thisform.release Else = Messagebox('not true for feeuser', 32, product) thisform.release Return .T. Endif else = Messagebox('not true for text1 value', 32, product) thisform.release Return .T. ENDIFThis can be streamlined a bit more also.
local cMsgText cMsgText = " " if thisform.text1.value=="123" if Alltrim(thisform.feeuser.value)=="khubaib" or Alltrim(thisform.feeuser.value)=="abid" feeuser=thisform.feeuser.value Do Form frsptc Else cMsgText = "not true for feeuser" Endif else cMsgText = "not true for text1 value" ENDIF if !empty(cMsgText) = Messagebox(cMsgText, 32, product) endif thisform.release Return .T.