|
8#
楼主 |
发表于 2017-8-28 18:36:53
|
只看该作者
我改成了这样,好象得行了。谢谢!!!
Private Sub 确定_Click()
Dim strWhere1, strWhere2 As String
strWhere1 = ""
strWhere2 = ""
If Not IsNull(Me.包站人筛选) Then
strWhere1 = strWhere1 & "包站人 like '*" & Me.包站人筛选 & "*' and "
strWhere2 = strWhere2 & "包站人 like '*" & Me.包站人筛选 & "*' and "
End If
If Not IsNull(Me.站址名称筛选) Then
strWhere1 = strWhere1 & "站址名称 like '*" & Me.站址名称筛选 & "*' and "
strWhere2 = strWhere2 & "站址名称 like '*" & Me.站址名称筛选 & "*' and "
End If
If Len(strWhere1) > 0 Then strWhere1 = Left(strWhere1, Len(strWhere1) - 5)
If Len(strWhere2) > 0 Then strWhere2 = Left(strWhere2, Len(strWhere2) - 5)
Forms![犍为专项整治信息登记表]![表历史告警清单查询筛选子窗体].Form.Filter = strWhere1
Forms![犍为专项整治信息登记表]![表历史告警清单查询筛选子窗体].Form.FilterOn = True
Forms![犍为专项整治信息登记表]![库历史告警清单库子窗体].Form.Filter = strWhere2
Forms![犍为专项整治信息登记表]![库历史告警清单库子窗体].Form.FilterOn = True
End Sub |
|