回 帖 发 新 帖 刷新版面

主题:请大家帮我看看哪错了,这是一条出库表单的按钮代码

local rec(4)
    库存表.bh=rec(1)
   
 thisform.bh1.readonly=.f.
 thisform.fdh1.readonly=.f.
 thisform.cz1.readonly=.f.
 thisform.kcwz1readonly=.f.
    thisform.grid1.enabled=.f.
      thisform.refresh
      thisform.bh1.setfocus


select 出库表
append blank
replace 编号 with thisform.bh1.value,分段号 with thisform.fdh1.value,材质 with thisform.cz1.value,库存位置 with thisform.kcwz1.value

select 库存表
if thisform.bh1.value=rec(1)
delete
pack
 thisform.bh1.readonly=.t.
 thisform.fdh1.readonly=.t.
 thisform.cz1.readonly=.t.
 thisform.kcwz1.readonly=.t.
 endif

回复列表 (共4个回复)

沙发

数组rec未赋初值

local rec(4)
库存表.bh=rec(1)    && 逻辑型?

板凳

這代碼寫得太別扭了吧!
  要刪除指針也不用定位的嗎?

3 楼

我对数组变量用的不好.rec(6)是代表四个字段:编号,分段号,材质,库存位置;
所以rec(1)就等于bh

4 楼

你好.我是全职网赚工作者.
如果你有时间有电脑.
想在网络上创业.请联系我..
项目绝对真实.详情QQ空间资料
加盟请联系 QQ908889846

我来回复

您尚未登录,请登录后再回复。点此登录或注册