VFP表单设计题求解
用表单设计器,设计如下图:假设性别表名为:xb.dbf, 字段名为:性别,属性为字符型。
复选框属性:Check1.Caption="男" Check2.Caption="女"
表格属性:Grid1.RecordSourceType=4
命令按钮属性:command1.Caption="查询" command2.Caption="退出"
在查询命令的Command1.click中输入如下代码:
xb1=thisform.Check1.value+2*thisform.Check2.value
do case
case xb1=0
thisform.grid1.RecordSource=""
case xb1=1
thisform.grid1.RecordSource=“sele * from xb where 性别=[男] cursor lsb"
case xb1=2
thisform.grid1.RecordSource=“sele * from xb where 性别=[女] cursor lsb"
case xb1=3
thisform.grid1.RecordSource=“sele * from xb cursor lsb"
endcase
在查询命令的Command2.click中输入如下代码:thisform.release
2024-10-28 广告