关于生日筛选---无今日生日时筛选无效 Post By:2014/8/26 13:03:00 [只看该作者]
没有今天生日时筛选无效,有生日时筛选有效,由于人数不多,原先加载数据后再遍历
DataTables("委员资料").Loadfilter = "现任=1" DataTables("委员资料").Load() 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("_Identify") End If Next If nms > "" Then nms = nms.Trim(",") Tables("生日提醒_table1").filter = "[_Identify] In (" & nms & ") " End If