Dim v1 As String = e.form.controls("textbox1").text
Dim v2 As String = e.form.controls("textbox2").text
Tables("高考信息查询表").Filter = "zdffs >= " & v1 & " and zgffs <= " & v2
Dim Filter As String
With e.Form.Controls("院校地区:")
If .Value IsNot Nothing Then
Filter = "yxdq = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("院校地址:")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "yxdz = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("院校名称:")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "yxmc = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("专业名称:")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "zymc = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("年 度:")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "nd = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("科 类:")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "kl = \'" & .Value & "\'"
End If
End With
If Filter > "" Then
Tables("高考信息查询表").Filter = Filter
End If