SELECT 客户订单
aa = ALLTRIM()
bb = ALLTRIM(thisform.text1.Value)
cc = "select * from 客户订单 where .t. "
IF !EMPTY(ALLTRIM(aa))
cc =cc + "and ALLTRIM(aa)$ 姓名 "
ENDIF
IF !EMPTY(ALLTRIM(bb))
cc =cc + "and购买日期 = CTOD(bb)"
ENDIF
cc = cc +"into cursor temp_客户订单 readwrite "
MESSAGEBOX(bb)
&cc