Dim tb As WinForm.Table = e.Form.Controls("Table1")
Dim dtp1 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim dtp2 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker2")
Dim drpb_name As WinForm.DropDownBox = e.Form.Controls("DropBox_name")
Dim drpb_bh As WinForm.DropDownBox = e.Form.Controls("DropBox_bh")
Dim rb_all As WinForm.RadioButton = e.Form.Controls("RadioButton_all")
Dim rb_wh As WinForm.RadioButton = e.Form.Controls("RadioButton_wh")
Dim rb_yh As WinForm.RadioButton = e.Form.Controls("RadioButton_yh")
If rb_all.Checked = True Then
If dtp1.Value IsNot Nothing And drpb_name.Text Is Nothing And drpb_bh.Text Is Nothing Then
Dim fiter As String = ("借出日期 >= #" & dtp1.value & "# And 借出日期 <= #" & dtp2.value & "# Or 归还日期 >= #" & dtp1.value & "# And 归还日期 <= #" & dtp2.value & "#")
tb.Table.Filter = fiter
End If
End If