请问:这段代码输入到什么地方运行,才能实现目录树
Forms("窗口1").open
Dim tr As WinForm.TreeView
Dim nd,nd1,nd2 As WinForm.TreeNode
tr = Forms("窗口1").Controls("TreeView1")
tr.nodes.clear
For Each r As Row In Tables("国家").Rows
nd = Tr.Nodes.Add(r("国名")) '第一个表的产品名称
For Each rr As Row In Tables("省").Rows
If rr("id").Substring(0,3) = r("id") And rr("id").length > 3
nd1 = nd.Nodes.Add(rr("省名")) '第二个表的产品名称
End If
For Each rrr As Row In Tables("市").Rows
If rr("id").Substring(0,3) = r("id") And rrr("id").Substring(0,6) = rr("id") And rrr("id").length > 6
nd2 = nd1.Nodes.Add(rrr("市名")) '第三个表的产品名称
End If
Next
Next
Next