Dim filter As String
Dim dtp1 As WinForm.DateTimePicker
Dim dtp2 As WinForm.DateTimePicker
Dim cmb As WinForm.ComboBox
dtp1 = e.Form. Controls("起始日期").text
dtp2 = e.Form. Controls("结束日期").text
cmb = e.Form. Controls("档案类型").text
If dtp1 Is Nothing
Messagebox.show("请输入起始日期!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else If dtp2 Is Nothing
Messagebox.show("请输入结束日期!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else If cmb Is Nothing
Messagebox.show("请输入档案类型!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
DataTables("档案明细查询_Table1").Fill("Select * From {档案管理明细} Where 归档日期 >= dtp1 And 归档日期 <= dtp2 And 档案类型 = cmb ","sqlserver",True)