刚才错了,应该是:
dim nd as node
for i = 1 t rs1.recordcount
set nd = treeview1.nodes.add ,,"A" & rs1("ID").value, rs1("Name")
for j=1 to rs2.recordcount
if rs2("AuthorID")= rs1("ID") then
treeview1.nodes.add nd,tvwchild,,rs2("workname")
end if
next j
next i
dim nd as node
for i = 1 t rs1.recordcount
set nd = treeview1.nodes.add "A" & rs1("ID").value, rs1("Name")
for j=1 to rs2.recordcount
if rs2("AuthorID")= rs1("ID") then
treeview1.nodes.add ,rs2("workname")
end if
next j
next i