|
违反劳动纪律时,这一点我原来没有看明白。
现在帮你修正
- Dim ctl As Control
- Private Sub Command16_Click()
- Dim strCriteria As String
- For Each ctl In Me.Controls
- If TypeOf ctl Is TextBox Or TypeOf ctl Is ComboBox Then
- If Not IsNull(ctl) Then
- Select Case ctl.Name
- Case "所在班组"
- If ctl <> "车间" Then
- strCriteria = strCriteria & ctl.Name & " like '" & ctl _
- & "' And "
- End If
- Case "考勤情况"
- If ctl <> "违反劳动纪律" Then
- strCriteria = strCriteria & ctl.Name & " like '" & ctl _
- & "' And "
- Else
- strCriteria = strCriteria & ctl.Name & _
- " in ('迟到','早退','旷工') And "
- End If
- Case "日期"
- strCriteria = strCriteria & ctl.Name & "=#" & ctl & "# And "
- Case Else
- strCriteria = strCriteria & ctl.Name & " like '" & ctl & _
- "' And "
- End Select
- End If
- End If
- Next
- If strCriteria <> "" Then
- strCriteria = Left(strCriteria, Len(strCriteria) - 5)
- End If
- Me.考勤管理子窗体.Form.Filter = strCriteria
- Me.考勤管理子窗体.Form.FilterOn = True
- End Sub
- Private Sub Command17_Click()
- For Each ctl In Me.Controls
- If TypeOf ctl Is TextBox Or TypeOf ctl Is ComboBox Then
- ctl = Null
- End If
- Next
- Me.考勤管理子窗体.Form.FilterOn = False
- End Sub
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|