有朋友告诉我了,发上来分享下,
Tables("信息表").filter = ""
Dim hg As WinForm.CheckBox = e.Form.Controls("CheckBox1")
Dim ds As WinForm.CheckBox = e.Form.Controls("CheckBox2")
Dim yqx As WinForm.CheckBox = e.Form.Controls("CheckBox3")
Dim Filter As String
With e.Form.Controls("CheckBox1")
If hg.checked = True Then
If Filter > "" Then
Filter = Filter & " or 状态 = '合格'"
Else
Filter = " 状态 = '合格'"
End If
End If
End With
With e.Form.Controls("CheckBox2")
If ds.checked = True Then
If Filter > "" Then
Filter = Filter & " or 状态 = '待审'"
Else
Filter = " 状态 = '待审'"
End If
End If
End With
With e.Form.Controls("CheckBox3")
If yqx.checked = True Then
If Filter > "" Then
Filter = Filter & " or 状态 = '己取消'"
Else
Filter = " 状态 = '己取消'"
End If
End If
End With
Tables("信息表").Filter = Filter