Gentlemen and Ladies,
Here is what I have come up with but it still does not seem to work? Note, for troubleshooting purposes Dim Days does have a date value and Days1 field is empty. Discrepancies and AllRead are set to False. Result is Me.NameLookup + " ^", however it should be Me.NameLookup. Thanks for any assistance.
The intent is to not Flag with "^" if there is no date value in EFExpires.
Here is what I have come up with but it still does not seem to work? Note, for troubleshooting purposes Dim Days does have a date value and Days1 field is empty. Discrepancies and AllRead are set to False. Result is Me.NameLookup + " ^", however it should be Me.NameLookup. Thanks for any assistance.
The intent is to not Flag with "^" if there is no date value in EFExpires.
Code:
Private Sub Sim_AfterUpdate()
Dim Days As Integer
Dim Days1 As Integer
On Error Resume Next
Days = DateDiff("d", Now, Me.PhysicalExpires)
If IsNull(Me.EFExpires) Then
Days1 = 20
Else
Days1 = DateDiff("d", Now, EFExpires)
If (Me.Discrepancies = True) Or (AllRead = True) Then
Dim Flagit As String
Flagit = Me.NameLookup + " ^"
Me.NewNameLookup = Flagit
Else
Dim Flagged As String
Flagged = Me.NameLookup
Me.NewNameLookup = Flagged
If (Days <= 14) Or (Days1 <= 14) Then
Dim Flagging As String
Flagging = Me.NameLookup + " ^"
Me.NewNameLookup = Flagging
Else
Dim Flaggert As String
Flaggert = Me.NameLookup
Me.NewNameLookup = Flaggert
End If
End If
End If
Form.Refresh
End Sub