您的位置:程序门 -> vb -> 基础类



在一个command事件里 这串代码为何只能实现几步?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


在一个command事件里 这串代码为何只能实现几步?
发表于:2007-01-05 14:04:45 楼主
如下代码   为什么我只能实现一步计算?

dim   row   as   string
dim   number1   as   string


      number1   =   me.text7.text
      data1.recordsource   =   "select   *   from   商品信息表   where   商品编号= ' "   +   number1   +   " ' "
      data1.refresh
richtextbox1.text   =   "商品编号: "   &   text1.text   &   vbcrlf   &   "条形码: "   &   text3.text   &   vbcrlf   &   "商品名称: "   &   text2.text   &   vbcrlf   &   "单价: "   &   text5.text   &   "元 "   &   vbcrlf   &   "库存剩余: "   &   text6.text
       
              on   error   goto   abc
                        text9.text   =   ccur(text5.text)   *   ccur(text8.text)
              resume   next

                    on   error   goto   abc
                        text10.text   =   ccur(text9.text)   +   ccur(text10.text)
              resume   next
abc:
      msgbox   "成绩必须是十进制数字,请检查成绩栏,若为空请用“0”填补 "
      exit   sub

row   =   text1.text   &   vbtab   &   text3.text   &   vbtab   &   text2.text   &   vbtab   &   text5.text   &   vbtab   &   text8.text   &   vbtab   &   text9.text   &   vbtab   &   text10.text
msflexgrid1.additem   row



  on   error   goto   abc
                        text9.text   =   ccur(text5.text)   *   ccur(text8.text)
              resume   next
执行后   ,

            on   error   goto   abc
                        text10.text   =   ccur(text9.text)   +   ccur(text10.text)
              resume   next

row   =   text1.text   &   vbtab   &   text3.text   &   vbtab   &   text2.text   &   vbtab   &   text5.text   &   vbtab   &   text8.text   &   vbtab   &   text9.text   &   vbtab   &   text10.text
msflexgrid1.additem   row
都不能正常执行   这是为什么?

请赐教   谢谢


快速检索

最新资讯
热门点击