标题: TreeView 问题,高手帮忙! [打印本页] 作者: 孤帆远影 时间: 2008-7-8 12:38 标题: TreeView 问题,高手帮忙! 高手帮忙,到底哪里有问题?作者: 孤帆远影 时间: 2008-7-8 13:55 标题: 着急啊,请高手帮忙! 为什么总是“类型不匹配”
Set TreeNode = XTree.Nodes.Add(, , rs.分类编号, rs.描述)作者: 孤帆远影 时间: 2008-7-8 16:52
请高手帮忙看看,这样的写法有什么问题吗?
Private Sub Form_Load()
Dim TreeNode As Node
Set db = DBEngine(0)(0)
strSQL = "select * from list order by 分类编号;"
Set rs = db.OpenRecordset(strSQL, DB_OPEN_DYNASET)
Set TreeNode = XTree.Nodes.Add(, , rs.分类编号, rs.描述)
TreeNode.Sorted = True
rs.Next
MaxLevel = DCount("分类编号", "list")
For i = 1 To MaxLevel - 1
Set TreeNode = XTree.Nodes.Add(rs.归类编号, tvwChild, rs.分类编号, rs.描述)
TreeNode.Sorted = True
rs.Next
Next
rs.Close
End Sub