Dim dt1 As Date=e.Form.Controls("DateTimePicker1").Value
Dim dt2 As Date=e.Form.Controls("DateTimePicker2").Value
Dim Filter As String
If dt1=Nothing Or dt2=Nothing Then
MessageBox.Show("起始或结束日期都不能为空!","友情提醒",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Else
With DataTables("计划采购表")
.LoadFilter="日期 >= #" & dt1 & "#" ' And 日期 <= #" & dt2 & "#"
.Load()
End With
End If
'#' 附近有语法错误。
[此贴子已经被作者于2019/12/2 16:20:20编辑过]