Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Message timer

Discussion in 'Information Technology' started by Jody K, Nov 19, 2005.

Tags:
  1. Jody K

    Jody K
    Expand Collapse
    Guest

    I would like for a message box to appear at lets say 5:45 am and 5:45 pm. I
    simply want the message box to remind the user to update another form. What
    would be the best way to accomplish this? Does anyone have an example?

    Thanks in advance for any help!
    Jody K.
     
  2. Loading...

    Similar Threads Forum Date
    How message of love from Sikh gurus are helping Pakistani Christians to fight forced conversions Sikh Sikhi Sikhism Oct 12, 2015
    Messages from God Sikh Sikhi Sikhism Aug 23, 2015
    Message of Guru Granth Sahib Essays on Sikhism Jan 30, 2014
    World U.N. chief's message to North Korean leader Breaking News Apr 12, 2013
    Christianity Pope Francis prays for world peace in Easter Sunday message Interfaith Dialogues Apr 1, 2013

  3. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Jody,

    I suppose you could use the Timer event of a form that would always be open.

    It depends how accurate you want to be with the times you mentioned.
    If, for example, "within 2 minutes of 5:45" is acceptable, then you
    could set the Timer Interval property of the form to 24000 (4 minutes).
    And then in the On Timer event property of the form you could put code
    like this...
    If (Time >= #5:43:00# And Time < #5:47:00#) Or _
    (Time >= #17:43:00# And Time < #17:47:00#) Then
    MsgBox "Ding dong", vbInformation, "Reminder"
    End If

    As a refinement, you could set the Timer Interval initially to an hour
    (3600000), for example. Then, the Timer code something like this...
    If Hour(Time) = 5 Or Hour(Time) = 17 Then
    Me.TimerInterval = 24000
    End If
    If (Time >= #5:43:00# And Time < #5:47:00#) Or _
    (Time >= #17:43:00# And Time < #17:47:00#) Then
    Me.TimerInterval = 3600000
    MsgBox "Ding dong", vbInformation, "Reminder"
    End If

    --
    Steve Schapel, Microsoft Access MVP

    Jody K wrote:
    > I would like for a message box to appear at lets say 5:45 am and 5:45 pm. I
    > simply want the message box to remind the user to update another form. What
    > would be the best way to accomplish this? Does anyone have an example?
    >
    > Thanks in advance for any help!
    > Jody K.
     
  4. Jody K

    Jody K
    Expand Collapse
    Guest

    Thanks Steve! This is exactly what i was wanting!

    "Steve Schapel" wrote:

    > Jody,
    >
    > I suppose you could use the Timer event of a form that would always be open.
    >
    > It depends how accurate you want to be with the times you mentioned.
    > If, for example, "within 2 minutes of 5:45" is acceptable, then you
    > could set the Timer Interval property of the form to 24000 (4 minutes).
    > And then in the On Timer event property of the form you could put code
    > like this...
    > If (Time >= #5:43:00# And Time < #5:47:00#) Or _
    > (Time >= #17:43:00# And Time < #17:47:00#) Then
    > MsgBox "Ding dong", vbInformation, "Reminder"
    > End If
    >
    > As a refinement, you could set the Timer Interval initially to an hour
    > (3600000), for example. Then, the Timer code something like this...
    > If Hour(Time) = 5 Or Hour(Time) = 17 Then
    > Me.TimerInterval = 24000
    > End If
    > If (Time >= #5:43:00# And Time < #5:47:00#) Or _
    > (Time >= #17:43:00# And Time < #17:47:00#) Then
    > Me.TimerInterval = 3600000
    > MsgBox "Ding dong", vbInformation, "Reminder"
    > End If
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    > Jody K wrote:
    > > I would like for a message box to appear at lets say 5:45 am and 5:45 pm. I
    > > simply want the message box to remind the user to update another form. What
    > > would be the best way to accomplish this? Does anyone have an example?
    > >
    > > Thanks in advance for any help!
    > > Jody K.

    >
     

Share This Page