在这个基础上改进一下:
http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=148926
动态生成任务页面和任务内容的代码如下:
With Forms("窗口1").Controls("TopicBar1").Pages
Dim lsts As New List(Of String)
lsts= DataTables("党员发展流程").getvalues("任务名称")
For Each s As String In lsts
Dim lsts2 As New List(Of String)
lsts2= DataTables("党员发展流程").getvalues("具体任务","任务名称='" & s & "'")
For Each s1 As String In lsts2
Dim p = .Add(s1,s1,"")
Dim lsts1 As New List(Of String())
lsts1= DataTables("党员发展流程").getvalues("子任务|对应窗体名称","任务名称='" & s & "'and 具体任务='" & s1 & "'")
For Each s2 As String() In lsts1
if s2(1) > "" then
p.Links.Add(s2(0) & "|" & s2(1), s2(0))
else
dim lk = p.Links.Add(s2(0), s2(0))
lk.enabled = false
endif
Next
Next
Next
End With