key is not in unique collection 求解!!!
Private Sub Form_Load() Dim rs As New ADODB.Recordset '声明认识rs为记录集对象
Sql = "select havetest from tb_user where usertype=0" & _
"and userid='" & UsId & "'" '把查询是否参加考试的标识字段赋给变量Sql
rs.Open Sql, cnn, adOpenStatic, adLockReadOnly '执行SQL语句
HaveTest = rs.Fields("HaveTest")
ShowButton
Dim nodX As Node
Set nodX = TreeView1.Nodes.Add(, , "X1", "课程概述", 1)
Set nodX = TreeView1.Nodes.Add(, , "X2", "学习要求", 1)
Set nodX = TreeView1.Nodes.Add("X2", tvwChild, "C1", "学习目标", 2)
Set nodX = TreeView1.Nodes.Add("X2", tvwChild, "C2", "学习重点", 2)
Set nodX = TreeView1.Nodes.Add("X2", tvwChild, "C3", "学习难点", 2)
End Sub 出现错误key is not in unique collection
如何调试