福建省计算机二级考试设计题答案.pdf
- number02个人认证 |
- 2021-03-02 发布|
- 505.51 KB|
- 7页
提示:作为设计题的第 2 题,一般地,做题前可以先试运行表单,其次要查看并了解数据
环境中的表。
&&表格显示的数据由2 个属性决定:recordsourceType 和recordsource
&&注意到recordsourceType 已经设置为4-查询,这里只需要设置recordsource 属性即可
bmh=alltrim(thisform.text1.value)
nd=alltrim(thisform.text2.value)
thisform.grid1.recordsource="select xsb.商品号,商品名,上半年利润, ;
下半年利润,上半年利润+下半年利润 from xsb,spdmb ;
where xsb.商品号=spdmb.商品号 and ;
部门号=bmh and 年度=nd into cursor tmp"
thisform.refresh
if thisform.optiongroup1.value=1 select 职员号,avg(金额) as 平均金额 from orders ; group by 职员号 order by 2 into table px_a
else select 职员号,avg(金额) as 平均金额 from orders ; 1 group by 职员号 order by 2 desc into table px_d
endif
if thisform.optiongroup1.value=1 thisform.grid1.recordsource="select 客户号,count(*), ; sum(金额) from orders group by 客户号 ; into cursor tmp"
endif
if thisform.