请问:这段代码有错码?为什么在命令窗口一执行,就退出 Foxtable 2011
Forms("产品配置").Show()
Forms("产品配置").Controls("GroupBox1").Enabled = not Forms("产品配置").Controls("GroupBox1").Enabled
Dim tr As WinForm.TreeView = Forms("产品配置").Controls("TreeView1")
Dim nd0,nd1,nd2,nd3,nd4,nd5 As WinForm.TreeNode
Dim fs As Integer
tr.Nodes.Clear '清空原来的节点::::::::::
For Each dr As DataRow In DataTables("产品信息").Select("","序号")
If dr("序号") <> "" Then
fs = dr("节点")
Select Case fs
Case 0
nd0 = tr.Nodes.Add(dr("序号").trim() ,dr("型号"))
Case 1
nd1 = nd0.Nodes.Add(dr("序号").trim() ,dr("型号"))
Case 2
nd2 = nd1.Nodes.Add(dr("序号").trim() ,dr("型号"))
Case 3
nd3 = nd2.Nodes.Add(dr("序号").trim() ,dr("型号"))
Case 4
nd4 = nd3.Nodes.Add(dr("序号").trim() ,dr("型号"))
Case 5
nd5 = nd4.Nodes.Add(dr("序号").trim() ,dr("型号"))
End Select
End If
Next