筛选空值失效,怎么都不能去掉已付的
此主题相关图片如下:1.jpg
Dim hh As WinForm.DateTimePicker = Forms("员工表").Controls("DateTimePicker1")
Dim ii As WinForm.DateTimePicker = Forms("员工表").Controls("DateTimePicker2")
Dim ll As WinForm.CheckBox = Forms("员工表").Controls("CheckBox1")
Dim lk As WinForm.CheckBox = Forms("员工表").Controls("CheckBox2")
Dim Filter As String
Filter = "[_Identify] is not null"
If hh.value IsNot Nothing AndAlso ii.value IsNot Nothing
vars("startdate") = hh.value
vars("enddate") = ii.value
Filter = Filter & " and " & "[交工日期] >= '" & hh.Value & "' and [交工日期] <= '" & ii.Value & "'"
End If
If ll.Checked = True AndAlso lk.Checked = False Then
Filter = Filter & " and " & "[已付] = 1"
End If
If lk.Checked = True AndAlso ll.Checked = False Then
Filter = Filter & " and " & "([已付] is null or [已付] <> 1)"
End If
Tables("员工表.工资结算").Filter = Filter