private CXRQ
if empty(thisform.text1.value) && 判断列表框和文本框是否为空
messagebox('请输入要查询的内容!',16,'系统提示')
thisform.text1.setfocus
else
do case
case thisform.optiongroup2.value=1
CXRQ="alltrim(员工编号)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=2
CXRQ="alltrim(员工姓名)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=3
CXRQ="alltrim(员工性别)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=4
CXRQ="出生日期"+alltrim()+"{^"+DTOC(thisform.text1.value)+"}"
case thisform.optiongroup2.value=5
CXRQ="alltrim(员工学历)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=6
CXRQ="alltrim(婚姻状况)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=7
CXRQ="alltrim(员工民族)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=8
CXRQ="alltrim(所学专业)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=9
CXRQ="alltrim(入职岗位)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=10
CXRQ="alltrim(家庭住址)"+alltrim()+"alltrim(thisform.text1.value)"
case thisform.optiongroup2.value=11
CXRQ="入职日期"+alltrim()+"{^"+DTOC(thisform.text1.value)+"}"
case thisform.optiongroup2.value=12
CXRQ="离职日期"+alltrim()+"{^"+DTOC(thisform.text1.value)+"}"
ENDCASE
local c as integer
IF thisform.optiongroup1.value=1
Select * from 员工登记 where &CXRQ into cursor 临时员工登记 &&cursor
sele 临时员工登记
c=reccount()
if c<1
messagebox("数据库中不存在您所要查询的记录",16,"系统提示")
ENDIF