将操作的主表放在第一位置,可将后面多表的数据合并到主表(后面各表都必须有姓名列作为参考列) 在主表(名称为“合并表”)设置窗口按钮公式: ClearGrid(Grid) And Eval(mid(Rept(" And DeleteCol(Grid,2)",Cols-1),5)) And Eval("AddCol(Grid,"""+Substitute(Eval("ListCols("""+Substitute(Substitute(ListGrids(),"合并表|",""),"|",""")+""|""+ListCols(""")+""")"),"|",""",0, True ) And AddCol(Grid,""")+""",0, True )") And Eval("AppendRows("""+Substitute(Substitute(ListGrids(),"合并表|",""),"|",""") And AppendRows(""")+""")") And DelReptRows(Grid,"姓名") And DelFor(Grid,"姓名","=","") And MoveCol("姓名",1) And Eval("Eval(""EvalFor(Grid,""""""+Substitute(Substitute(Substitute(Eval(""Substitute(""""|@|#|"""",""""|"""",""""""+Substitute(Substitute(ListCols(Grid),""姓名|"",""""),""|"","""""")+""""|""""+Substitute(""""|@|#|"""",""""|"""","""""")+"""""")""),""@"","""""",""""FindText("""""""""+Substitute(Substitute(Substitute(ListGrids(),"合并表|",""),"|","/"),"/",""""""""",""""""""""),""#"","""""""""",""""""""姓名"""""""",""""""""="""""""",[姓名])"""",""""""),""|"","""""",""""="""","""""""") And EvalFor(Grid,"""""")+"""""",""""="""","""""""")"") And Eval(""EvalFor(Grid,""""""+Substitute(Substitute(Substitute(Eval(""Substitute(""""|@|#|"""",""""|"""",""""""+Substitute(Substitute(ListCols(Grid),""姓名|"",""""),""|"","""""")+""""|""""+Substitute(""""|@|#|"""",""""|"""","""""")+"""""")""),""@"","""""",""""FindText(""""""""")+""""""""",""""""""""),""#"","""""""""",""""""""姓名"""""""",""""""""="""""""",[姓名])"""","""""&
|