回复 2楼 sanjie38
我确信我没有打开那个“个人信息表”。选择表我是另做的一个表单,用按钮组做的选择。。数组那个东西无论如何我也用不起来。。不过马上我试试你的,看看行不行。。
还是没懂为什么会出那个 “文件正在使用”……第三条我也没理解。。。哎
不过还是谢谢你了,我再研究研究去。
程序代码:a=thisform.pageframe1.page1.text1.value
b=alltrim(thisform.pageframe1.page1.text7.value)
c=thisform.pageframe1.page1.text4.value
d=alltrim(thisform.pageframe1.page1.text2.value)
e=alltrim(thisform.pageframe1.page1.text3.value)
f=alltrim(thisform.pageframe1.page1.text6.value)
sele 个人信息
go top
locate for 个人信息.编号==a
if found()
messagebox("记录存在!",[color=#800000; font-weight: bold][color=#800000; font-weight: bold][color=#800000; font-weight: bold]0[/color][/color][/color]+[color=#800000; font-weight: bold][color=#800000; font-weight: bold][color=#800000; font-weight: bold]16[/color][/color][/color]+[color=#800000; font-weight: bold][color=#800000; font-weight: bold][color=#800000; font-weight: bold]0[/color][/color][/color],"错误")
else
insert into 个人信息 values(a,b,d,c,e,f)
messagebox("添加成功!",[color=#800000; font-weight: bold][color=#800000; font-weight: bold][color=#800000; font-weight: bold]0[/color][/color][/color]+[color=#800000; font-weight: bold][color=#800000; font-weight: bold][color=#800000; font-weight: bold]64[/color][/color][/color]+[color=#800000; font-weight: bold][color=#800000; font-weight: bold][color=#800000; font-weight: bold]0[/color][/color][/color],"提示")
endif
thisform.pageframe1.page1.text1.value=""
thisform.pageframe1.page1.text2.value=""
thisform.pageframe1.page1.text3.value=""
thisform.pageframe1.page1.text4.value=""
thisform.pageframe1.page1.text6.value=""
thisform.pageframe1.page1.text7.value=""多谢几位了。。不过代码改成这个样子了。。。文本框的设置 数值型的数据类型也改成了“数值型”,还是数据类型不匹配