Dim d1 As Date = e.Form.Controls("DateTimePicker8").Value
Dim d2 As Date = e.Form.Controls("DateTimePicker9").Value
If d1 = Nothing Or d2 = Nothing Then
MessageBox.Show("起始或结束日期都不能为空!","友情提醒", MessageBoxButtons.OK,MessageBoxIcon.Warning)
Else
For Each c As object In e.Form.Controls("GroupBox7").Children
If c.checked = True Then
With DataTables("tblPAdmission")
.LoadFilter = c.Text & ">=#" & d1 & "# and " & c.Text & "<=#" & d2 & "#"
.Load()
End With
End If
Next
End If