|
-
Jan 29th, 2000, 09:04 AM
#1
Thread Starter
New Member
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.
-
Jan 29th, 2000, 01:07 PM
#2
Addicted Member
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.
-
Jan 29th, 2000, 03:52 PM
#3
Addicted Member
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.
-
Jan 30th, 2000, 10:18 AM
#4
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|