加入判断
Dim cmd As New SQLCommand
cmd.C'
cmd.C
Dim dt2 As DataTable
Dim dr2 As DataRow
cmd.CommandText = "Select top 1 * From crm_customer_track where creator<>" & _userid & " and track_user=" & _userid &" Order by track_id desc"
dt2 = cmd.ExecuteReader
If dt2.DataRows.Count <= 0 Then
msgbox("没有查到数据")
Else
dr2 = dt2.DataRows(0)
If GeninShuliang<>dr2("track_id") Then
Dim dt3 As DataTable
Dim dr3 As DataRow
cmd.CommandText = "Select emp_name From pub_user where user_id=" & dr2("creator")
dt3 = cmd.ExecuteReader
If dt3.DataRows.Count <= 0 Then
msgbox("没有查到数据")
Else
dr3 = dt3.DataRows(0)
If dr2("next_time")>= Date.Today And dr2("next_time") <Date.Today.AddDays(1) Then
nfi.BalloonTipTitle=dr3("emp_name") & "给你发来今天需要处理的内容为:"
nfi.BalloonTipText =dr2("track_note")
nfi.ShowBalloonTip(300000) '提示显示的事件(毫秒)
End If
GeninShuliang=dr2("track_id")
End If
End If
End If