当然,这个提醒本来就比一般的提醒要复杂的。
设置在AfterOpenProject事件:
Dim ids As String
Dim cnt As Integer
Dim nms 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 Date.Today.AddDays(1) = dt Then
cnt = cnt + 1
ids = ids & "," & dr("_Identify")
nms = nms & "," & dr("姓名")
End If
Next
If cnt > 0 Then
messagebox.show("有" & cnt & "个客户明天生日, 分别是: " & nms.Trim(","))
Tables("客户信息").filter = "[_Identify] In (" & ids.Trim(",") &")"
End If