|
varRSXC.Close
varRSXC.Open "select * from 金税用户回访记录表 where 编号=(select max(编号) from 金税用户回访记录表 where 企业ID='" & Me.企业ID & "')" And "select * from 金税用户维护情况表 where 编号=(select max(编号) from 金税用户维护情况表 where 企业ID='" & Me.企业ID & "')"
If varRSXC.RecordCount = 0 Then
Me.HFMessage.Caption = "此企业没有回访记录"
Me.HFMessage.BackColor = RGB(255, 0, 0)
Else
If IsNull(varRSXC!回访日期) Then
Me.HFMessage.Caption = "最后回访记录日期为空"
Me.HFMessage.BackColor = RGB(255, 0, 0)
Else
If DateDiff("m", varRSXC!回访日期, Date) <= 3 Then
Me.HFMessage.Caption = "此企业3个月内没有回访,维护"
Me.HFMessage.BackColor = RGB(255, 128, 0)
End If
If DateDiff("m", varRSXC!回访日期, Date) > 3 And DateDiff("m", varRSXC!回访日期, Date) <= 6 Then
Me.HFMessage.Caption = "此企业3-6个月内没有回访,维护"
Me.HFMessage.BackColor = RGB(255, 128, 255)
End If
If DateDiff("m", varRSXC!回访日期, Date) > 6 And DateDiff("m", varRSXC!回访日期, Date) <= 9 Then
Me.HFMessage.Caption = "此企业6-9个月内没有回访,维护"
Me.HFMessage.BackColor = RGB(0, 255, 0)
End If
If DateDiff("m", varRSXC!回访日期, Date) > 9 And DateDiff("m", varRSXC!回访日期, Date) <= 12 Then
Me.HFMessage.Caption = "此企业9-12个月内没有回访,维护"
Me.HFMessage.BackColor = RGB(255, 255, 0)
End If
If DateDiff("m", varRSXC!回访日期, Date) > 12 Then
Me.HFMessage.Caption = "此企业" & DateDiff("m", varRSXC!回访日期, Date) & "个月内没有回访,维护"
Me.HFMessage.BackColor = RGB(0, 255, 255)
End If
各位高手,能不能告诉我这个为什么无法运行,我的语句哪里错了,请指点!~ |
|