标题: [求助] 学习高手案例时遇到的问题——查询复选框 [打印本页] 作者: itez 时间: 2006-5-17 20:01 标题: [求助] 学习高手案例时遇到的问题——查询复选框 Public Sub chaxun()
Dim stw As String
stw = ""
If Not IsNull(Me.职工编号) Then stw = "[职工编号]='" & Me.职工编号 & "' and "
If Not IsNull(Me.姓名) Then stw = "[姓名]='" & Me.姓名 & "' and "
If Not IsNull(Me.胆结石) Then stw = "[胆结石]='" & Me.胆结石 & "' and "
If Not IsNull(Me.脂肪肝) Then stw = "[脂肪肝]='" & Me.脂肪肝 & "' and "
If Len(stw) > 1 Then stw = Left(stw, Len(stw) - 5)
Me.[表1 子窗体].Form.FilterOn = True
Me.[表1 子窗体].Form.Filter = stw
End Sub
Private Sub 胆结石_AfterUpdate()
Call chaxun
End Sub
Private Sub 姓名_AfterUpdate()
Call chaxun
End Sub
Private Sub 脂肪肝_AfterUpdate()
Call chaxun
End Sub
Private Sub 职工编号_AfterUpdate()
Call chaxun
End Sub