Current Table.Select(0,1) '移动到姓名列
Syscmd.Filter.Equal()
Forms("人员查找").show
Dim Filter As String
With e.Form.Controls("StartDate")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "日期 < #" & .Value.AddDAys(1) & "#"
End If
End With
Tables("人员信息").Filter = Filter
Dim txt As WinForm.TextBox = e.Form.Controls("TextBox1")
txt.Value=Tables("病患信息").Rows.Count
Dim Sum As Double=Taables("人员信息").comput("sum(离开天数)")
txt2.Value=Sum
主要想先按人名筛选完毕后,再按时间筛选,可是运行结果只是筛选时间,有好几个人,我这是哪里错了
|