请教高手这段代码哪里有错,怎么运行后提示“数据类型不匹配”?
a=alltrim(thisform.Text1.value)b=alltrim(thisform.Text2.value)
c=alltrim(thisform.Text3.value)
d=alltrim(thisform.Text4.value)
e=alltrim(thisform.Text5.value)
f=alltrim()
g=alltrim(thisform.Text7.value)
h=alltrim(thisform.Text8.value)
if empty(a) &&此条件成立则说明该文本框是空的
messagebox("请输入手册编号!",16,"系统提示")
return
else
locate for aac001=a
if .not.eof() &&此条件成立,说明要添加的内容和表中有重复的
go top
messagebox("手册编号不允许有重复!",16,"系统提示")
thisform.Text1.setfocus
return
endif
endif
if empty(b)
messagebox("请输入失业编号!",16,"系统提示")
return
else
locate for syzh=b
if .not.eof()
go top
messagebox("失业编号不允许有重复!",16,"系统提示")
thisform.Text1.setfocus
return
endif
endif
if empty(c)
messagebox("请输入姓名!",16,"系统提示")
return
endif
if empty(d)
messagebox("请输入身份证号!",16,"系统提示")
return
else
locate for alltri(sfzh)=alltri(d)
if .not.eof()
go top
messagebox("身份证号不允许有重复!",16,"系统提示")
thisform.Text1.setfocus
return
endif
endif
if empty(e)
messagebox("请输入异动时间!",16,"系统提示")
return
endif
if empty(f)
messagebox("请选择异动标志!",16,"系统提示")
return
endif
if val(thisform.Text7.value)=0.and.val(thisform.Text8.value)=0
messagebox("请输入上半年或下半年失业基数!",16,"系统提示")
return
endif
msg=messagebox('确定要添加记录吗?',32+4,'系统提示')
if msg=6
append blank
go bottom
replace aac001 with alltrim(thisform.Text1.value),;
syzh with alltrim(thisform.Text2.value),;
xm with alltrim(thisform.Text3.value),;
sfzh with alltrim(thisform.Text4.value),;
ydsj with ctod(substr(alltrim(thisform.Text5.value),6,2)+"/"+right(alltrim(thisform.Text5.value),2)+"/"+left(alltrim(thisform.Text5.value),4)),;
ydbz with alltrim(),;
syjs with val(thisform.Text7.value),;
syjs1 with val(thisform.Text8.value),;
dwmc with "****公司",;
dwbh with "32020011035451",;
nian with year(date()),;
yue with month(ydsj),;
xh with recn()
messagebox('保存记录成功!',64,'系统提示')
thisform.Text1.value=""
thisform.Text2.value=""
thisform.Text3.value=""
thisform.Text4.value=""
thisform.Text5.value=""
thisform.Text7.value=""
thisform.Text8.value=""
thisform.refresh
endif
运行后提示标红部分有错,提示“数据类型不匹配”,但数据库中已保存成功。