What I am trying to do is this:
If the DateDiff between Today’s Date and a date entered in the NextSchContact field is say <= -90 then I want to put a message in an unbound field called Message. If the DateDiff is <= -180 then I would like a different message to appear…I can make it work by doing = -90 but I am having trouble getting it to work with <=
If I do this the way I can make it work I’d have to put at least 365 different statements in the code…I am trying to avoid this…
How can or can I make it work with “<=“
Here is the code that will work…
Private Sub Form_Current()
Me.Message = DateDiff("d", Date, [NextSchContact])
If Me.Message = -90 Then
Me.Message = "This Customer hasn't been contacted in over 90 days...”
ElseIf Me.Message = -180 Then
Me.Message = "This Customer hasn't been contacted in over 180 days..."
ElseIf Me.Message = -270 Then
Me.Message = "This Customer hasn't been contacted in over 270 days..."
End If
Exit Sub
End Sub
Any and All Help Appreciated
Thanks
Don
Edited Because of Typo...I am starting to get a bad case of Fat Fingers...
[This message has been edited by donbettis (edited 01-07-2002).]
If the DateDiff between Today’s Date and a date entered in the NextSchContact field is say <= -90 then I want to put a message in an unbound field called Message. If the DateDiff is <= -180 then I would like a different message to appear…I can make it work by doing = -90 but I am having trouble getting it to work with <=
If I do this the way I can make it work I’d have to put at least 365 different statements in the code…I am trying to avoid this…
How can or can I make it work with “<=“
Here is the code that will work…
Private Sub Form_Current()
Me.Message = DateDiff("d", Date, [NextSchContact])
If Me.Message = -90 Then
Me.Message = "This Customer hasn't been contacted in over 90 days...”
ElseIf Me.Message = -180 Then
Me.Message = "This Customer hasn't been contacted in over 180 days..."
ElseIf Me.Message = -270 Then
Me.Message = "This Customer hasn't been contacted in over 270 days..."
End If
Exit Sub
End Sub
Any and All Help Appreciated
Thanks
Don
Edited Because of Typo...I am starting to get a bad case of Fat Fingers...
[This message has been edited by donbettis (edited 01-07-2002).]