Dim nms As String
For Each dr As DataRow In DataTables("员工登记表格").DataRows
Dim dt As Date = dr("个人基本资料_出生年月")
If dt.Month = Date.Today.Month AndAlso dt.Day = Date.Today.Day Then
nms = nms & ",'" & dr("个人基本资料_姓名") & "'"
End If
Next
If nms > "" Then
nms = nms.Trim(",")
Tables("员工登记表格").filter = "[个人基本资料_姓名] In (" & nms &")"
Else
Tables("员工登记表格").filter = "[_Identify] Is Null"
End If
Dim d As Date = Date.Today
Dim y As Integer = d.Year
Dim m As Integer = d.Month
Dim Days As Integer = Date.DaysInMonth(y,m)
Dim fd As Date = New Date(y,m,1) '该月的第一天
Dim ld As Date = New Date(y,m,Days) '该月的最后一天
Dim ids As String
For Each dr As DataRow In DataTables("员工登记表格").DataRows
Dim dt As Date = dr("个人基本资料_出生年月")
dt = New Date(Date.Today.Year,dt.Month,dt.Day)
If dt >= fd AndAlso dt <= ld Then
ids = ids & "," & dr("_Identify")
End If
Next
If ids > "" Then
ids = ids.Trim(",")
Tables("员工登记表格").filter = "[_Identify] In (" & ids &")"
else
Tables("员工登记表格").filter = "[_Identify] Is Null"
End If