|
拜读了一些有关TREEVIEW的讨论,研究了半天,总算对treeview有一点点初步的了解,但各位讨论及所提供的范例实在太深了,我实在不懂,我只想要能够双击之后能够开启一张表单
Private Sub Form_Load()
Dim objtree As TreeView
Dim nodx As Node
Set objtree = Me.TreeView1.Object
Set nodx = TreeView1.Nodes.Add(, , "A", "进销存作业", "k1")
nodx.Sorted = True
Set nodx = TreeView1.Nodes.Add("A", tvwChild, "B01", "基本数据维护", "k1")
nodx.Sorted = True
Set Nodex = TreeView1.Nodes.Add("A", tvwChild, "B02", "采购操作系统", "k1")
nodx.Sorted = True
Set Nodex = TreeView1.Nodes.Add("A", tvwChild, "B03", "进货操作系统", "k1")
nodx.Sorted = True
Set Nodex = TreeView1.Nodes.Add("A", tvwChild, "B04", "销货操作系统", "k1")
nodx.Sorted = True
Set nodx = TreeView1.Nodes.Add("B01", tvwChild, "C01", "客户数据维护作业", "k1")
nodx.Sorted = True
Set nodx = TreeView1.Nodes.Add("B01", tvwChild, "C02", "厂商数据维护作业", "k1")
nodx.Sorted = True
Set nodx = TreeView1.Nodes.Add("B01", tvwChild, "C03", "品号数据维护作业", "k1")
nodx.Sorted = True
End Sub
例如,我想要双击《客户数据维护作业》后,可以启动 docmd 来打开表单。谢谢! |
|