With e.Form.Controls("ComboBox1")
If .Value = e.Form.Controls("ComboBox1").Items(0)
Dim Filter As String
Filter = "分类 = '" & .Value & "'"
With e.Form.Controls("StartDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "缴费_月租_起计日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "缴费_月租_止计日期 <= #" & .Value & "#"
End If
End With
With e.Form.Controls("DropBox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "车牌号码 = '" & .Value & "'"
End If
End With
With DataTables("安所属日期查询_Table1")
If Filter > "" Then
LockBaseMainForm() '锁定主界面
.StopRedraw()
.LoadFilter = Filter
.Load()
.ResumeRedraw()
UnLockBaseMainForm() '解锁主界面
End If
End With
ElseIf .Value = e.Form.Controls("ComboBox1").Items(1)
Dim Filter1 As String
Filter1 = "分类 = '" & .Value & "'"
With e.Form.Controls("StartDate")
If .Value IsNot Nothing Then
If Filter1 >"" Then
Filter1 = Filter1 & " And "
End If
Filter1 = Filter1 & "缴费_临时停放_起计时间 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate")
If .Value IsNot Nothing Then
If Filter1 >"" Then
Filter1 = Filter1 & " And "
End If
Filter1 = Filter1 & "缴费_临时停放_止计时间 <= #" & .Value & "#"
End If
End With
With e.Form.Controls("DropBox1")
If .Value IsNot Nothing Then
If Filter1 > "" Then
Filter1 = Filter1 & " And "
End If
Filter1 = Filter1 & "车牌号码 = '" & .Value & "'"
End If
End With
With DataTables("安所属日期查询_Table1")
If Filter1 > "" Then
LockBaseMainForm() '锁定主界面
.StopRedraw()
.LoadFilter = Filter1
.Load()
.ResumeRedraw()
UnLockBaseMainForm() '解锁主界面
End If
End With
End If
End With