VFP 怎样将查询结果显示在表格控件中
GRID的数据源是视图1,怎样点击“查询”按钮后,将查询结果显示在GRID中,然后怎样将查询结果打印出来thisform.grid1.recordsourcetype=0...
GRID的数据源是视图1,怎样点击“查询”按钮后,将查询结果显示在GRID中,然后怎样将查询结果打印出来
thisform.grid1.recordsourcetype=0
thisform.grid1.recordsource="视图1"
THISFORM.REFRESH
这段代码是协写在“查询”CLICK中吗?
“查询”CLICK代码
select dorm.dorm_id,bed.bed_id,bed.state,dorm.sex,dorm.kezhu,dorm.yizhu;
from 寝室数据!bed inner join 寝室数据!dorm;
on bed.dorm_id=dorm.dorm_id;
where dorm.sex=alltrim(thisform.text3.value);
and bed.state="未住人";
GROUP BY Dorm.sex;
ORDER BY Dorm.dorm_id; 展开
thisform.grid1.recordsourcetype=0
thisform.grid1.recordsource="视图1"
THISFORM.REFRESH
这段代码是协写在“查询”CLICK中吗?
“查询”CLICK代码
select dorm.dorm_id,bed.bed_id,bed.state,dorm.sex,dorm.kezhu,dorm.yizhu;
from 寝室数据!bed inner join 寝室数据!dorm;
on bed.dorm_id=dorm.dorm_id;
where dorm.sex=alltrim(thisform.text3.value);
and bed.state="未住人";
GROUP BY Dorm.sex;
ORDER BY Dorm.dorm_id; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询