以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]判断某列是否为空的问题。  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=13371)

--  作者:wangliang
--  发布时间:2011/10/10 9:07:00
--  [求助]判断某列是否为空的问题。

生产通知单增加一行,子表明细1和明细2增加八行,现在要多八行进行操作,如果支数列为空则删除,不为空则保存,一下代码错在哪里

Dim t1 As Table=Tables("生产通知单明细1")
Dim t2 As Table =Tables("生产通知单明细2")
For i As Integer = Tables("生产通知单明细1").Rows.count-8 To Tables("生产通知单明细1").Rows.count-1
 Dim dr1 As Row = t1.Rows(i)
 Dim dr2 As Row =t2.Rows(i)
If dr1("支数") IsNot Nothing Then
 dr1.save()
 dr2.save()
Else
 End If
 dr1.delete()
 dr2.delete()
Next


--  作者:狐狸爸爸
--  发布时间:2011/10/10 9:10:00
--  

Dim t1 As Table=Tables("生产通知单明细1")
Dim t2 As Table =Tables("生产通知单明细2")
For i As Integer = Tables("生产通知单明细1").Rows.count-8 To Tables("生产通知单明细1").Rows.count-1
    Dim dr1 As Row = t1.Rows(i)
    Dim dr2 As Row =t2.Rows(i)
    If dr1.IsNull("支数") = False Then
        dr1.save()
        dr2.save()
    End If
    dr1.delete()
    dr2.delete()
Next

 

参考:

http://www.foxtable.com/help/topics/0595.htm

http://www.foxtable.com/help/topics/0426.htm

 


--  作者:wangliang
--  发布时间:2011/10/10 9:33:00
--