Foxtable(狐表)用户栏目专家坐堂 → 到期提醒一个表只提醒一次


  共有2397人关注过本帖平板打印复制链接

主题:到期提醒一个表只提醒一次

帅哥哟,离线,有人找我吗?
deliangzhaoe
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:364 积分:3491 威望:0 精华:0 注册:2012/7/24 7:15:00
到期提醒一个表只提醒一次  发帖心情 Post By:2018/10/22 17:33:00 [只看该作者]

一个表中有两个或三个到期,只提醒一次,如何解决,代码如何改?谢谢

Dim dt4 As Date = Date.Today.AddDays(30)
Dim dr20 As DataRow = DataTables("安全资格培训").Find("下次培训日期 <= #" & dt4 & "#")
Dim dtdq As Date = Date.Today
Dim dr21 As DataRow = DataTables("安全资格培训").Find("下次培训日期 < #" & dtdq & "#")
If dr21 IsNot Nothing Then
    MessageBox.Show(dr21("企业名称") & ":" & vbcrlf & "    企业负责人/安全员培训合格证已过期未复审","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
ElseIf dr20 IsNot Nothing Then
    MessageBox.Show(dr20("企业名称") & ":" & vbcrlf & "    企业负责人/安全员培训合格证即将到期复审","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If


 回到顶部