进货表单“确定”代码如下:public val t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11
t1=int(val(thisform.edit1.value))
t2=thisform.edit2.value
t3=int(val(thisform.edit3.value))
t4=thisform.edit4.value
t5=val(thisform.edit5.value)
t6=val(thisform.edit6.value)
t7=val(thisform.edit7.value)
t8=val(thisform.edit8.value)
t9=t7*t6
t10=t7*(t8-t7)
t11=int(val(""))
select
kc
if t1=t11
messagebox("请输入编码!")
else
if t1=id
messagebox("该编号已存在,请更换编号!")
else
insert into kc values (t1,t2,t3,t4,t5,t6)
insert into cb values (t1,t9,t10,0,t7,t8)
messagebox("数据添加成功!")
endif
endif
thisform.edit1.value=""
thisform.edit2.value=""
thisform.edit3.value=""
thisform.edit4.value=""
thisform.edit5.value=""
thisform.edit6.value=""
thisform.edit7.value=""
thisform.edit8.value=""