户类型为“全部”时,怎么查询?
Dim Filter As String
With e.Form.Controls("ComboBox1")
If .Value IsNot Nothing Then
Filter = "乡镇 = '" & .Value & "'"
End If
End With
With e.Form.Controls("ComboBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "行政村 = '" & .Value & "'"
End If
End With
With e.Form.Controls("ComboBox3")
e.Form.Controls("ComboBox4").Value = Nothing
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "户类型 = '" & .Value & "'"
End If
End With
[此贴子已经被作者于2024/5/6 9:43:48编辑过]