我的项目在窗口启动后事件中写入加载的行是姓名列是当前用户名的行信息(这个问题实现)
此主题相关图片如下:qq截图20130312131015.png
再者我想在两个日期控件填入日期值时,对当前用户名的行信息进行时段的筛选
代码为:
Dim bm As WinForm.ComboBox = e.Form.Controls("部门")
Dim xm As WinForm.ComboBox = e.Form.Controls("姓名")
Dim sqsj As WinForm.DateTimePicker = e.Form.Controls("申请日期")
Dim jj As WinForm.ComboBox = e.Form.Controls("出差需求方")
Dim s1 As WinForm.DateTimePicker = e.Form.Controls("申请日期止")
If bm.Text = "" Then
Tables("出差申请表").Filter="[申请人姓名] = '" & user.Name & "'"
Else
Dim dr As DataRow = DataTables("出差申请表").find("[申请人姓名] = '" & user.Name & "'")
If dr IsNot Nothing Then
Tables("出差申请表").Filter ="[申请人姓名] = '" & user.Name & "'And 申请日期 > #" & IIF(sqsj.Text = "", "1/1/1900", sqsj.Text) & "#'And 申请日期 < #" & IIF(s1.Text = "", "1/1/1900", s1.Text) & "#"
Else
Tables("出差申请表").Filter="部门 like '*" & bm.Text & "*' and 需求出差方 like '*" & jj.text & "*' And 申请人姓名 Like '*" & xm.Text & "*' And 申请日期 > #" & IIF(sqsj.Text = "", "1/1/1900", sqsj.Text) & "#'And 申请日期 < #" & IIF(s1.Text = "", "1/1/1900", s1.Text) & "#"
End If
End If
现在问题是填入日期后没有任何的筛选动作(注:代码写在日期输入框事件:ValueChanged)