Dim Filter1 As String
With e.Form.Controls("loudaima")
If .Value IsNot Nothing Then
Filter1 = "楼代码 = '" & .Value & "'"
End If
End With
With e.Form.Controls("xiaoqu")
If .Value IsNot Nothing Then
If Filter1 > "" Then
Filter1 = Filter1 & " And "
End If
Filter1 = Filter1 & "小区 = '" & .Value & "'"
End If
End With
With e.Form.Controls("louhao")
If .Value IsNot Nothing Then
If Filter1 > "" Then
Filter1 = Filter1 & " And "
End If
Filter1 = Filter1 & "楼号 = '" & .Value & "'"
End If
End With
With e.Form.Controls("danyuan")
If .Value IsNot Nothing Then
If Filter1 > "" Then
Filter1 = Filter1 & " And "
End If
Filter1 = Filter1 & "单元 = '" & .Value & "'"
End If
End With
With e.Form.Controls("cengshu")
If .Value IsNot Nothing Then
If Filter1 > "" Then
Filter1 = Filter1 & " And "
End If
Filter1 = Filter1 & "层数 = '" & .Value & "'"
End If
End With
With e.Form.Controls("shihao")
If .Value IsNot Nothing Then
If Filter1 > "" Then
Filter1 = Filter1 & " And "
End If
Filter1 = Filter1 & "室号 = '" & .Value & "'"
End If
End With