Dim Filter As String
With e.Form.Controls("查询条件")
If .Value IsNot Nothing Then
if e.Form.Controls("内容").Value is nothing then
msgbox("没有选择列名")
return
end if
Filter = Filter & e.Form.Controls("内容").Value & " = '" & .Value & "'"
End If
End With
With e.Form.Controls("预计开始日期1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
……