Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2004
    Posts
    173

    Unanswered: Set 1 or 2 Day Reminder in Outlook from Access

    If Me!ApptReminder Then
    .ReminderMinutesBeforeStart = Me!ReminderMinutes
    .ReminderSet = True
    End If

    I am using the code snippet above to set a reminder when adding an appt to Outlook from an Access form
    it works with 10 minutes - 15 minutes, 30 minutes, etc.. but not with days?

    How can I set the reminder to 1 day or 2 days?
    I tried 1440 minutes 60*24 - it added the appt, but the reminder was not set to anything

    Any Help is Appreciated - the entire code is below

    Thanks - AB

    code ------

    Dim objOutlook As Outlook.Application
    Dim objAppt As Outlook.AppointmentItem
    Dim objRecurPattern As Outlook.RecurrencePattern

    Set objOutlook = CreateObject("Outlook.Application")
    Set objAppt = objOutlook.CreateItem(olAppointmentItem)

    With objAppt
    .Start = Me!ApptDate & " " & Me!ApptTime
    .Duration = Me!ApptLength
    .Subject = Me!Appt

    If Not IsNull(Me!ApptNotes) Then .Body = Me!ApptNotes
    If Not IsNull(Me!ApptLocation) Then .Location = Me!ApptLocation
    If Me!ApptReminder Then
    .ReminderMinutesBeforeStart = Me!ReminderMinutes


    .ReminderSet = True
    End If



    .Save
    .Close (olSave)
    End With
    Set objAppt = Nothing
    End If

    'Release the Outlook object variable.
    Set objOutlook = Nothing


    DoCmd.RunCommand acCmdSaveRecord
    MsgBox "Appointment Added!"

    Exit Sub

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Check what properties are exposed for the object.. it may be that you need to use a different setting or a different format.
    check the documentation

    the syntax looks fine
    is the code getting there? is the value of Me!ApptReminder true?

    put a watch on the
    Code:
    If Me!ApptReminder Then
    and then check if the if statement is executed and what the value of Me!ReminderMinutes is
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2004
    Posts
    173

    Yes - Code Works and Sets a Reminder

    The code above works - it will only set a reminder for minutes...
    For the life of me, I cannot get it to work for days!

    AB

  4. #4
    Join Date
    Sep 2005
    Posts
    19

    worked in outlook

    I tried doing this though VB in outlook and it worked fine. I could set the reminder out as far as 22 days. Anything beyond resulted in an overflow.

    I did the same thing you did except that i hardcoded the subject, start, duration, etc.

  5. #5
    Join Date
    Aug 2004
    Posts
    173

    Can I see your VB Code?

    Quote Originally Posted by newblu
    I tried doing this though VB in outlook and it worked fine. I could set the reminder out as far as 22 days. Anything beyond resulted in an overflow.

    I did the same thing you did except that i hardcoded the subject, start, duration, etc.

    can you post the lines of code you used for the reminder?

    AB

  6. #6
    Join Date
    Sep 2005
    Posts
    19
    Quote Originally Posted by abinboston
    can you post the lines of code you used for the reminder?

    AB
    Function set_reminder()

    Dim OutApp As Outlook.Application
    Dim apti As Outlook.AppointmentItem
    Set OutApp = CreateObject("Outlook.application")
    Set apti = OutApp.CreateItem(olAppointmentItem)
    apti.Subject = "open gifts"
    apti.Start = #12/25/2008 7:00:00 AM#
    apti.ReminderSet = True
    apti.ReminderMinutesBeforeStart = 60 * 24 * 2
    apti.Save

    End Function

  7. #7
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    Thank You!

    Hey NewBlu,

    Thanks alot for the code. I just tried it and it worked great. I'm going to see if I can't incorporate that into some of my apps!

    Have a great holiday!
    --If its free, take it for what its worth!

  8. #8
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    Sorry

    I should have mentioned that I tried it in both Excel and in Access via a form and the only thing I had to do was add the Microsoft Outlook 11.0 Object Library to my references.
    --If its free, take it for what its worth!

  9. #9
    Join Date
    Sep 2005
    Posts
    19
    Quote Originally Posted by stuschmied
    Hey NewBlu,

    Thanks alot for the code. I just tried it and it worked great. I'm going to see if I can't incorporate that into some of my apps!

    Have a great holiday!
    thanks - you too. Glad to be able to help.

Posting Permissions

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