I am trying to create a warning if a course is due to expire in less than 2 months. I have tried this code:
But, I am not getting the results I should. I also need to get it to ignore blanks.
Code:
TodaysDate = Now
Dim rsc As DAO.Recordset
Dim CSCSCourseExpiry As Long
Dim DayCheck As String
DayCheck = TodaysDate.Value + 62
CSCSCourseExpiry = DCount("*", "TblFittersLocal", "[CSCSExp]" < DayCheck)
If CSCSCourseExpiry > 0 Then
MsgBox CSCSCourseExpiry & " CSCS Certifications are due to expire in less than 2 months"
Else
End If
Comment