Dim dt As DataTable = DataTables("all业绩表")
dt.DataRows.Clear
Dim d1 As Date = Forms("佣金一览表").Controls("StartDate").Value
Dim d2 As Date = Forms("佣金一览表").Controls("EndDate").Value
Dim filter2 As String = "入职日期 <= #" & d2 & "# and (离职日期 >= #" & d1 & "# or 离职日期 is null)"
For Each dr As DataRow In DataTables("users").Select(filter2)
Dim ndr As DataRow = dt.AddNew
ndr("姓名") = dr("姓名")
ndr("部门") = dr("部门名称")
ndr("职称") = dr("职称名称")
ndr("业绩") = DataTables("员工业绩表").Compute("sum(已收佣金)","[姓名] = '" & dr("姓名") & "'")
Next
MainTable = Tables("all业绩表")
Forms("全员业绩表").open
以上只能实现“users”表的 姓名 列内容添加进来,但是“员工业绩表” 却还有 “users”表里没有的人员,请问该如何把两个表显示的不重复的姓名 添加进来呢