以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  下列清零代码放在单个表中执行,而放在全局代码表事件不执行?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=79792)

--  作者:lyfxybc
--  发布时间:2016/1/9 7:51:00
--  下列清零代码放在单个表中执行,而放在全局代码表事件不执行?
下列代码放在单个表中执行,而放在全局代码表事件不执行?

下列代码需要列出所有数值类型的数据列

Select Case  e.datacol.name    
    Case  "A","B","C" ,....            \'
注意这里列出你想清零的数值类型的数据列,不能是表达式列
      if  e.datarow(e.datacol.name)=0 then
         e.datarow(e.datacol.name)=nothing
      end if
End Select

下列代码不需列出数据列,放在单个表中执行,当表多时,每个表都要加入,如何放在全局表事件中,对所有表起作用。 

If e.datacol.IsNumeric Then

      if  e.datarow(e.datacol.name)=0 then
         e.datarow(e.datacol.name)=nothing
      end if

End If

[此贴子已经被作者于2016/1/9 7:51:27编辑过]

--  作者:Hyphen
--  发布时间:2016/1/9 9:21:00
--  
看看
http://www.foxtable.com/help/topics/0671.htm

--  作者:lyfxybc
--  发布时间:2016/1/9 14:42:00
--  
谢谢,已完成