| 发表于:2007-05-09 09:44:16 楼主 |
private sub comadd_click() '添加 dim bh as integer '自动创建商品编号 rs1.open "select * from spinf order by 商品编号 ", cnn, adopenkeyset, adlockoptimistic if rs1.recordcount > 0 then if not rs1.eof then rs1.movelast if rs1.fields( "商品编号 ") <> " " then bh = right(trim(rs1.fields( "商品编号 ")), 7) + 1 text3(0).text = "s " & format(bh, "0000000 ") end if else text3(0).text = "s0000001 " end if rs1.close '清空text3中的内容 for i = 1 to 8 text3(i).enabled = true text3(i).text = " " next i '设置控件状态 comsave.enabled = true: comesc.enabled = true: comadd.enabled = false commodify.enabled = false: comdelete.enabled = false for i = 0 to 3 cmdmd(i).enabled = false next i sstab1.tab = 0 text3(2).setfocus end sub 为什么执行到text(3)2.setfocus的时候就显示“实时错误5,无效的过程调用或参数 " |
|
|
|
|