|
4#
楼主 |
发表于 2010-3-25 08:47:36
|
只看该作者
不是添加“省份”一样啊,设节点为“爷1”就行了
LOAD再添加下面这些:
Rec.Open "人员名单", CurrentProject.Connection, adOpenKeyset, adLockOptimistic, adCmdTableDirect
For i = 0 To Rec.RecordCo ...
asklove 发表于 2010-3-25 08:13
我昨天就说这么干的,不行啊!
'设置第二级"父"
'* ---------------------------
Rec.Open "地区表", CurrentProject.Connection, adOpenKeyset, adLockOptimistic, adCmdTableDirect
For i = 0 To Rec.RecordCount - 1
Set nodindex = TreeView.Nodes.Add("爷", tvwChild, "父" & Rec.Fields("地区编号"), Rec.Fields("省市名称"), "K1", "K2")
nodindex.Sorted = True
Rec.MoveNext
Next
Rec.Close
Rec.Open "人员名单", CurrentProject.Connection, adOpenKeyset, adLockOptimistic, adCmdTableDirect
For i = 0 To Rec.RecordCount - 1
Set nodindex = TreeView.Nodes.Add("爷1", tvwChild, "父1" & Rec.Fields("编号"), Rec.Fields("姓名"), "K1", "K2")
nodindex.Sorted = True
Rec.MoveNext
Next
Rec.Close |
|