| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 435 人关注过本帖
标题:[求助]结点问题
只看楼主 加入收藏
djccit
Rank: 1
等 级:新手上路
帖 子:87
专家分:0
注 册:2005-12-26
收藏
 问题点数:0 回复次数:0 
[求助]结点问题


Public Sub Tree_change()
TreeView1.Nodes.Clear

Dim Nod As Node '创建树
Dim key, text As String
text = "小型企业管理系统"

Set Nod = TreeView1.Nodes.Add(, tvwChild, , text, 1)


Dim nodex As Node
Dim str As ADODB.Recordset
Dim str1 As ADODB.Recordset
Dim strSQL As String
Dim a As String, b As String
a = "main_menu"
TreeView1.LineStyle = tvwRootLines
strSQL = "select distinct main_menu from department order by main_menu"
Set str = ExecuteSQL(strSQL)

strSQL = "select distinct main_menu,son_menu from department order by main_menu,son_menu"


Set str1 = ExecuteSQL(strSQL)
str.MoveFirst
Do Until str.EOF
str1.MoveFirst
Set nodex = TreeView1.Nodes.Add(1, tvwChild, a, str.Fields(0), 1, 1)

Do Until str1.EOF
If str.Fields(0) = str1.Fields(0) Then
' Set nodex = TreeView1.Nodes.Add(2, tvwChild, a, str1.Fields(1), 2, 2)
End If
str1.MoveNext
Loop

a = a & "1"
str.MoveNext
Loop
str.Close
str1.Close
Set str = Nothing
Set str1 = Nothing

nodex.EnsureVisible '展开结点
End Sub
程序运行中出现错误,出现错误的行就是被注销的那一句,大家请帮帮忙,究竟该怎么改
提示错误是: 实时错误“35602” 集合中的关键字不唯一

搜索更多相关主题的帖子: 结点 
2006-05-09 19:10
快速回复:[求助]结点问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.047643 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved