Gentlemen and Ladies,
I am having issues with this one...
If there is no value in the Dim it will result in:
Me.NameLookup + " ^"
For instance, if I have not added a date for Me.PhysicalExpires yet when it gets to the If (Days<=14) Then it ends up giving me the 'Then' statement...however, I want it to go to the 'Else' for any fields that are not populated with dates yet.
At a loss...
Thanks for helping this newbie.
I am having issues with this one...
If there is no value in the Dim it will result in:
Me.NameLookup + " ^"
For instance, if I have not added a date for Me.PhysicalExpires yet when it gets to the If (Days<=14) Then it ends up giving me the 'Then' statement...however, I want it to go to the 'Else' for any fields that are not populated with dates yet.
At a loss...
Code:
Private Sub Discrepancies_AfterUpdate()
'updates Flags
Dim Days As Integer
Dim Days1 As Integer
Dim Days2 As Integer
Dim Days3 As Integer
Dim Days4 As Integer
Dim Days5 As Integer
Dim Days6 As Integer
Dim Days7 As Integer
Dim Days8 As Integer
Dim Days9 As Integer
Dim Days10 As Integer
Dim Days11 As Integer
On Error Resume Next
Days = DateDiff("d", Now, Me.PhysicalExpires)
Days1 = DateDiff("d", Now, Me.EFExpires)
Days2 = DateDiff("d", Now, Me.ADExpires)
Days3 = DateDiff("d", Now, Me.34CExpires)
Days4 = DateDiff("d", Now, Me.INSTExpires)
Days5 = DateDiff("d", Now, Me.PhysExpires)
Days6 = DateDiff("d", Now, Me.SeatExpires)
Days7 = DateDiff("d", Now, Me.LabExpires)
Days8 = DateDiff("d", Now, Me.AFExpires)
Days9 = DateDiff("d", Now, Me.CExpires)
Days10 = DateDiff("d", Now, Me.FireExpires)
Days11 = DateDiff("d", Now, ReviewDateExpire)
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) Or (Days2 <= 14) Or (Days3 <= 14) Or (Days4 <= 14) Or (Days5 < 14) Or (Days6 <= 14) Or (Days7 <= 14) Or (Days8 <= 14) Or (Days9 <= 14) Or (Days10 <= 14) Or (Days11 <= 14) Then
Dim Flagging As String
Flagging = Me.NameLookup + " ^"
Me.NewNameLookup = Flagging
Else
End If
End If
Form.Refresh
End Sub