-- 关于后台筛选,这段代码的问题究竟在哪里?
关于后台筛选,这段代码的问题究竟在哪里?
Dim LoadFilter As String
With e.Form.Controls("开始日期")
If .Value IsNot Nothing Then
If LoadFilter >"" Then
LoadFilter = LoadFilter & " And "
End If
LoadFilter = LoadFilter & "录入日期 >= \'" & .Value & "\'"
End If
End With
With e.Form.Controls("结束日期")
If .Value IsNot Nothing Then
If LoadFilter >"" Then
LoadFilter = LoadFilter & " And "
End If
LoadFilter = LoadFilter & "录入日期 <= \'" & .Value & "\'"
End If
End With
If e.Form.Controls("标注").Checked = True \' 如果付款状态选择了"已付"
If LoadFilter >"" Then
LoadFilter = LoadFilter & " And "
End If
LoadFilter = LoadFilter & "标注 = True"
End If
If e.Form.Controls("未标注").Checked = True \' 如果付款状态选择了"未付"
If LoadFilter >"" Then
LoadFilter = LoadFilter & " And "
End If
LoadFilter = LoadFilter & "标注 = False Or 标注 Is Null"
End If
If LoadFilter > "" Then
DataTables("服装资料表").Load()
End If