分类汇总后 放在一个临时表中,为什么不能显示结果??
以下代码,如果只要这些是正常的。会在大窗口显示结果
select 姓名,购买日期 , sum(总价) as 汇总价,SUM(进价*数量) as 进货总价 ,SUM(总价-进价*数量) as 毛利润,SUM(运费) as 总运费 from 客户订单 ;
WHERE 姓名 = AND 购买日期 = CTOD(thisform.text1.value) group by 姓名,购买日期
如果加上
INTO cursor jg2 在grid1中不显示结果,是怎么回事呢
thisform.grid1.RecordSource = ""
thisform.grid1.RecordSource = 1
select 姓名,购买日期 , sum(总价) as 汇总价,SUM(进价*数量) as 进货总价 ,SUM(总价-进价*数量) as 毛利润,SUM(运费) as 总运费 from 客户订单 ;
WHERE 姓名 = AND 购买日期 = CTOD(thisform.text1.value) group by 姓名,购买日期 INTO cursor jg2
SELECT jg2
thisform.grid1.RecordSource = "jg2"
thisform.grid1.RecordSource = 1
GO TOP IN jg2
thisform.grid1.Refresh