我给一个确定按钮写了如下代码:
if flag=1
set order to 职工编号
strxh=alltrim(thisform.text1.value)
if empty(thisform.text1.value)
messagebox("职工编号不能为空",30,"错误")
return
endif
seek (strxh)
if found()
messagebox("此职员号已存在,请另输一个",48,"错误")
thisform.text1.value=''
thisform.text1.setfocus
return
endif
append blank
insert into xcsj values(strxh,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
endif
replace 职工编号 with alltrim(thisform.text1.value)
replace 姓名 with alltrim(thisform.text2.value)
replace 性别 with alltrim(thisform.text3.value)
replace 职务级别 with alltrim(thisform.text4.value)
replace 岗位 with alltrim(thisform.text5.value)
replace 部门 with alltrim(thisform.text6.value)
replace 岗位等级 with alltrim(thisform.text7.value)
replace 岗位系数 with alltrim(thisform.text8.value)
replace 岗位工资 with alltrim(thisform.text9.value)
replace 加班工资 with alltrim(thisform.text10.value)
replace 实发绩效工资 with alltrim(thisform.text11.value)
replace 出勤天数 with alltrim(thisform.text12.value)
replace 绩效工资基准 with alltrim(thisform.text13.value)
replace 日工资 with alltrim(thisform.text14.value)
replace 考核等级 with alltrim(thisform.text15.value)
replace 备注 with alltrim(thisform.text16.value)
replace 应发小计 with alltrim(thisform.text17.value)
replace 住房_交通补贴 with alltrim(thisform.text18.value)
replace 通讯费 with alltrim(thisform.text19.value)
replace 应扣小计 with alltrim(thisform.text20.value)
replace 养老保险 with alltrim(thisform.text21.value)
replace 医疗保险 with alltrim(thisform.text22.value)
replace 失业保险 with alltrim(thisform.text23.value)
replace 税前工资 with alltrim(thisform.text24.value)
replace 扣所得税 with alltrim(thisform.text25.value)
replace 实发工资 with alltrim(thisform.text26.value)
messagebox("本次操作成功",30,"提示")
thisform.text1.controlsource="xcsj.职工编号"
thisform.text2.controlsource="xcsj.姓名"
thisform.text3.controlsource="xcsj.性别"
thisform.text4.controlsource="xcsj.职务级别"
thisform.text5.controlsource="xcsj.岗位"
thisform.text6.controlsource="xcsj.部门"
thisform.text7.controlsource="xcsj.岗位等级"
thisform.text8.controlsource="xcsj.岗位系数"
thisform.text9.controlsource="xcsj.岗位工资"
thisform.text10.controlsource="xcsj.加班工资"
thisform.text11.controlsource="xcsj.实发绩效工资"
thisform.text12.controlsource="xcsj.出勤天数"
thisform.text13.controlsource="xcsj.绩效工资基准"
thisform.text14.controlsource="xcsj.日工资"
thisform.text15.controlsource="xcsj.考核等级"
thisform.text16.controlsource="xcsj.备注"
thisform.text17.controlsource="xcsj.应发小计"
thisform.text18.controlsource="xcsj.住房_交通补贴"
thisform.text19.controlsource="xcsj.通讯费"
thisform.text20.controlsource="xcsj.应扣小计"
thisform.text21.controlsource="xcsj.养老保险"
thisform.text22.controlsource="xcsj.医疗保险"
thisform.text23.controlsource="xcsj.失业保险"
thisform.text24.controlsource="xcsj.税前工资"
thisform.text25.controlsource="xcsj.扣所得税"
thisform.text26.controlsource="xcsj.实发工资"
thisform.text1.enabled=.f.
thisform.text2.enabled=.f.
thisform.text3.enabled=.f.
thisform.text4.enabled=.f.
thisform.text5.enabled=.f.
thisform.text6.enabled=.f.
thisform.text7.enabled=.f.
thisform.text8.enabled=.f.
thisform.text9.enabled=.f.
thisform.text10.enabled=.f.
thisform.text11.enabled=.f.
thisform.text12.enabled=.f.
thisform.text13.enabled=.f.
thisform.text14.enabled=.f.
thisform.text15.enabled=.f.
thisform.text16.enabled=.f.
thisform.text17.enabled=.f.
thisform.text18.enabled=.f.
thisform.text19.enabled=.f.
thisform.text20.enabled=.f.
thisform.text21.enabled=.f.
thisform.text22.enabled=.f.
thisform.text23.enabled=.f.
thisform.text24.enabled=.f.
thisform.text25.enabled=.f.
thisform.text26.enabled=.f.
thisform.refresh
可是在添加数据的时候总是提示数据类型不匹配,请问是哪里出的问题啊?
我基本是照书上写的啊