cExpr=".T."
IF !EMPTY(THISFORM.TEXT1.VALUE)
cExpr=cExpr+".AND.编号=["+ALLTRIM(STR(THISFORM.TEXT1.VALUE))+"]"
ENDIF
IF !EMPTY(THISFORM.TEXT2.VALUE)
cExpr=cExpr+".AND.物品名=["+ALLTRIM(THISFORM.TEXT2.VALUE)+"]"
ENDIF
IF !EMPTY(THISFORM.TEXT3.VALUE)
cExpr=cExpr+".AND.货主=["+ALLTRIM(THISFORM.TEXT3.VALUE)+"]"
ENDIF
SELECT * FROM wprk WHERE &cExpr