Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2004

    Unanswered: Modify or Update an Appointment in Outlook

    I have a table that stores appointments in MS Access - a form is used to run the code below, which adds the appt to Outlook. it works fine..

    What I would like to do is this..

    If I modify the appt information in MS accdess via the same form, i would like the ability to update the existinf appt in Outlook.

    Any ideas are appreciated..

    here is the code used to add the appt to Outlook


    Private Sub AddAppt_Click()

    On Error GoTo AddAppt_Err
    ' Save record first to be sure required fields are filled.
    DoCmd.RunCommand acCmdSaveRecord
    ' Exit the procedure if appointment has been added to Outlook.
    If Me!AddedToOutlook = True Then
    MsgBox "This appointment already added to Microsoft Outlook"
    Exit Sub
    ' Add a new appointment.
    Dim outobj As Outlook.Application
    Dim outappt As Outlook.AppointmentItem
    Set outobj = CreateObject("outlook.application")
    Set outappt = outobj.CreateItem(olAppointmentItem)
    With outappt
    .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 = _
    If Me!ApptReminder Then
    .ReminderMinutesBeforeStart = Me!ReminderMinutes
    .ReminderSet = True
    End If
    End With
    End If
    ' Release the Outlook object variable.
    Set outobj = Nothing
    ' Set the AddedToOutlook flag, save the record, display a message.
    Me!AddedToOutlook = True
    DoCmd.RunCommand acCmdSaveRecord
    MsgBox "Appointment Added!"
    Exit Sub
    MsgBox "Error " & Err.Number & vbCrLf & Err.Description
    Exit Sub

    End Sub
    Last edited by abinboston; 05-02-06 at 00:33. Reason: test

Posting Permissions

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