[求助]Grid赋值出错,不明白了
查询(command2)代码如下
do case
case thisform.Check1.Value=1
syear=thisform.Container1.Combo1.value
smonth=thisform.Container1.Combo2.value
sday=thisform.Container1.Combo3.value
oyear=thisform.Container1.Combo4.value
omonth=thisform.Container1.Combo5.value
oday=thisform.Container1.Combo6.value
startdate='{^'+syear+'/'+smonth+'/'+sday+'}'
overdate='{^'+oyear+'/'+omonth+'/'+oday+'}'
dwmzbl=thisform.Combo1.value
thisform.Grid1.RecordSource="SELECT Jz.jzid AS 汇审号, Jz.日期, Jz.使用册数, Jz.作废组数, Dw.收费单位 + Xm.项目名称 as 收费项目, Jz.收费组数, Jz.金额, Sh.审核人, Zg.专管员 From jz!jz, jz!dw, jz!sh, jz!zg, jz!xm where (dw.收费单位 + xm.项目名称)==" + dwmzbl + " .and. Jz.jzid in Select Jz.jzid from jz where jz.日期 >= " + startdate + " .and. jz.日期 <= " + overdate + " ORDER BY Dw.收费单位,xm.项目名称,jz.jzid"
case thisform.Check1.Value=0
dwmzbl=thisform.Combo1.value
thisform.Grid1.RecordSource="SELECT Jz.jzid AS 汇审号, Jz.日期, Jz.使用册数, Jz.作废组数, Dw.收费单位, Xm.项目名称, Jz.收费组数, Jz.金额 From jz!jz, jz!dw, jz!sh, jz!zg, jz!xm where ALLTRIM(dw.收费单位)+ALLTRIM(xm.项目名称)==" + thisform.Combo1.value + " ORDER BY Dw.收费单位,xm.项目名称,jz.jzid"
endcase
点击查询后上面的表格结果总是不正确
是thisform.Grid1.RecordSource的赋值语句出错 可是我看不出问题在哪