Results 1 to 4 of 4

Thread: Countdown Days

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Location
    Wichita, KS, US
    Posts
    10

    Post

    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.

  2. #2
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Post

    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.

  3. #3
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Post

    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.

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Location
    Wichita, KS, US
    Posts
    10

    Post

    Thanks a lot!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width