以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 求解!! (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=16363) |
-- 作者:hongshizijun -- 发布时间:2012/2/10 22:32:00 -- 求解!! 我做了个小项目 建了个表 假别弄了个下拉
又弄了个窗口
缺勤统计按钮的代码是
Dim g As New CrossTableBuilder("缺勤统计表", DataTables("员工缺勤统计表"))
Dim Filter As String With e.Form.Controls("TextBox1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "姓名 = \'" & .Value & "\'" End If End With With e.Form.Controls("TextBox2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "隶属类别 = \'" & .Value & "\'" End If End With With e.Form.Controls("TextBox3") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "假别 = \'" & .Value & "\'" End If End With With e.Form.Controls("DateTimePicker1") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "请假日期 >= #" & .Value & "#" End If End With With e.Form.Controls("DateTimePicker2") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "请假日期<= #" & .Value & "#" End If End With g.Filter = Filter g.HGroups.AddDef("姓名") g.VGroups.AddDef("假别") g.Totals.AddDef("请假时间", "请假时间") g.Build() MainTable = Tables("缺勤统计表") 我这个功能就是能对“姓名”“隶属类别”“假别”“起止时间”,进行筛选后统计 员工假别的总时间
现在我想在窗口上实现的功能是 多值 假别 筛选 后统计 员工假别的总时间
例如 我做的那个只能对 单一“假别” 或 所有“假别” 进行统计 现在想实现的就是 可以在窗口对 “病假” 和“计生” 的统计 就是可以对任意组合的“假别”统计
求代码!!!
先谢谢!
|