I made some modification to the Wizard Search class that comes with visual foxpro. I add another Field,operator and a value.
Made some change to the searchexpr method and when I run it a get error in code
Please find out the code that I made some change and beleive I do not know where is my mistake.
HELP
thank you
******************************************************************
LOCAL cGetExpr1,cGetExpr2,cGetExpr3,cJoin,cJoin1,cGetExpr
&&NEW
m.cGetExpr1 = THIS.SearchItem(THIS.cboFields1,THIS.cboOperators1,THIS.txtExpr1)
m.cGetExpr2 = THIS.SearchItem(THIS.cboFields2,THIS.cboOperators2,THIS.txtExpr2)
m.cGetExpr3 = THIS.SearchItem(THIS.cboFields3,THIS.cboOperators3,THIS.txtExpr3)
m.cJoin = IIF(THIS.optGrpAndOr.value = 2," OR "," AND ")
m.cJoin1 = IIF(THIS.optGrpAndOr2.value = 2," OR "," AND ") &&NEW
DO CASE
CASE EMPTY(m.cGetExpr1) AND EMPTY(m.cGetExpr2) AND EMPTY(m.cGetExpr3)
m.cGetExpr = ""
CASE EMPTY(m.cGetExpr3) &&NEW
m.cGetExpr = m.cGetExpr1
CASE EMPTY(m.cGetExpr2)
m.cGetExpr = m.cGetExpr1
CASE EMPTY(m.cGetExpr1)
m.cGetExpr = m.cGetExpr2 or m.cGetExpr = m.cGetExpr3
OTHERWISE
m.cGetExpr = m.cGetExpr1+m.cJoin+m.cJoin1+m.cGetExpr2+m.cGetExpr3
&&NEW &&NEW
ENDCASE
RETURN m.cGetExpr
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement