-
I am creating an app. that requires the user to enter the date of their last annual equipment inspection. I want to have a message box come up to remind them of the next inspection (exactly one year after the date they already entered), I want it to start reminding them 7 days before the actual date, but I have no clue how to do this. Any help is greatly appreciated.
-
Hi Eman.
- Check Datediff() function in your help file.
- Since you are going to be using a database, make:
One field(date Type)LastInsp.
One field(date Type)NextInsp.
and go from there. :)
If more help needed let me know.
Good Luck.
-
OK Eman.
Try this one:
Private Sub Form_Load()
futuredate = DateAdd("yyyy", 1, Date)
daysleft = Abs(DateDiff("y", futuredate, Date))
If daysleft <= 7 Then
MsgBox "There are: " & daysleft & " Days for inspection!"
End If
End Sub
cdate("2000/02/15")
Replace the above with Datediff's Futuredate For testing .
Good Luck.
-