getbh=alltrim(thisform.pageframe1.page1.text1.value) &&获得编号 getxm=alltrim(thisform.pageframe1.page1.text2.value) &&获得姓名 flag1=thisform.pageframe1.page1.check1.value flag2=thisform.pageframe1.page1.check2.value
if flag1=1 and flag2=0 &&按输入的编号查询。运行他的时候有问题 set order to tag 编号 seek getbh if found() select * from 工资管理!员工信息 where 编号=getbh into cursor ttable thisform.pageframe1.page1.txt编号.Controlsource="ttable.编号" thisform.pageframe1.page1.txt姓名.Controlsource="ttable.姓名" thisform.pageframe1.page1.txt性别.Controlsource="ttable.性别" thisform.pageframe1.page1.txt出生年月.Controlsource="ttable.出生年月" thisform.pageframe1.page1.txt部门.Controlsource="ttable.部门" thisform.pageframe1.page1.txt职称.Controlsource="ttable.职称" thisform.pageframe1.page1.txt毕业学校.Controlsource="ttable.毕业学校" thisform.pageframe1.page1.txt学历.Controlsource="ttable.学历" thisform.pageframe1.page1.refresh else messagebox("没有找到记录",48,"SORRY") ENDIF endif if flag1=0 and flag2=1 locate for 姓名=getxm if found() select *from 工资管理!员工信息 where 姓名=getxm order by 员工信息.编号 desc into cursor ttable thisform.pageframe1.page1.txt编号.Controlsource="ttable.编号" thisform.pageframe1.page1.txt姓名.Controlsource="ttable.姓名" thisform.pageframe1.page1.txt性别.Controlsource="ttable.性别" thisform.pageframe1.page1.txt出生年月.Controlsource="ttable.出生年月" thisform.pageframe1.page1.txt部门.Controlsource="ttable.部门" thisform.pageframe1.page1.txt职称.Controlsource="ttable.职称" thisform.pageframe1.page1.txt毕业学校.Controlsource="ttable.毕业学校" thisform.pageframe1.page1.txt学历.Controlsource="ttable.学历" thisform.pageframe1.page1.refresh else messagebox("没有找到记录",48,"SORRY") ENDIF endif if flag1=1 and flag2=1 locate for 姓名=getxm and 编号=getbh if found() select * from 工资管理!员工信息 where 姓名=getxm and 编号=getbh order by 员工信息.编号 desc into cursor ttable thisform.pageframe1.page1.txt编号.Controlsource="ttable.编号" thisform.pageframe1.page1.txt姓名.Controlsource="ttable.姓名" thisform.pageframe1.page1.txt性别.Controlsource="ttable.性别" thisform.pageframe1.page1.txt出生年月.Controlsource="ttable.出生年月" thisform.pageframe1.page1.txt部门.Controlsource="ttable.部门" thisform.pageframe1.page1.txt职称.Controlsource="ttable.职称" thisform.pageframe1.page1.txt毕业学校.Controlsource="ttable.毕业学校" thisform.pageframe1.page1.txt学历.Controlsource="ttable.学历" thisform.pageframe1.page1.refresh else messagebox("没有找到记录",48,"SORRY") ENDIF endif
运行的时候输入编号或者姓名来查找。但出现的错误是
“SQL:未找到列'编号=getbh”
“未知的txt编号”
“未知的txt姓名”等/
请帮忙看一下。谢谢