GroupTableBuilder不能实现先定义,后赋值?如下列代码, “tbl = GroupTableBuilder(tblMod & tMenu.Name , DataTables(tblName))”报错
Dim tbl As GroupTableBuilder
Select Case tblMod
Case "分析库" : tbl = GroupTableBuilder(tblMod & tMenu.Name , DataTables(tblName))
Select Case tMenu.Name
Case "查代码重复":grpCols = "编码|代码|单项|单位|分部|分项|工序"
tFilter = "代码 <>'' And Count(代码)>1"
tSort = "编码,代码"
End Select
Case "钢铁库" : tbl= GroupTableBuilder(tblMod & tMenu.Name , DataTables(tblName))
Select Case tMenu.Name
Case "重复钢材":grpCols = "编码|代码|单项|单位|分部|分项|工序"
tFilter = "代码 <>'' And Count(代码)>1"
tSort = "编码,代码"
End Select
End Select
aGrpCol = grpCols.Split("|")
For Each tGrp As String In aGrpCol
tbl.Groups.AddDef(tGrp)
Next