Welcome to SPN

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

Sign Up Now!

linking outlook calendar to access database form

Discussion in 'Information Technology' started by KAT, Nov 1, 2005.

  1. KAT

    KAT
    Expand Collapse
    Guest

    is it possible to link you outlook calendar to an access database form if so
    how do you do it. I want to be able to enter a date on the form have show on
    my calendar so when the date pops up an alert shows up on my calendar that I
    have something to do on this date from access form...
    is this possible to do and how do you do it?
     
  2. Loading...


  3. george.k

    george.k
    Expand Collapse
    Guest

    Ï KAT <KAT@discussions.microsoft.com> Ýãñáøå óôï ìÞíõìá óõæÞôçóçò:
    8F6A6C1B-E5E8-4EE5-B70F-E9EE561C5F3B@microsoft.com...
    > is it possible to link you outlook calendar to an access database form if

    so
    > how do you do it. I want to be able to enter a date on the form have show

    on
    > my calendar so when the date pops up an alert shows up on my calendar that

    I
    > have something to do on this date from access form...
    > is this possible to do and how do you do it?
     
  4. Ron Hinds

    Ron Hinds
    Expand Collapse
    Guest

    "KAT" <KAT@discussions.microsoft.com> wrote in message
    news:8F6A6C1B-E5E8-4EE5-B70F-E9EE561C5F3B@microsoft.com...
    > is it possible to link you outlook calendar to an access database form if

    so
    > how do you do it. I want to be able to enter a date on the form have show

    on
    > my calendar so when the date pops up an alert shows up on my calendar that

    I
    > have something to do on this date from access form...
    > is this possible to do and how do you do it?


    Yes it is possible. You control Outlook through COM (formerly OLE)
    Automation. You need to set a reference in your Project to Outlook. Here is
    a sample code snippet to set an appointment reminder:

    Public Sub addAppointment(strID As String, strName As String, strPhone As
    String, strContact As String, Optional varMinutes As Variant, Optional
    strMessage As Variant)

    On Error GoTo Error_addAppointment

    Dim objOutlook As Object
    Dim objAppointment As AppointmentItem
    Dim boolLaunched As Boolean

    On Error Resume Next

    Set objOutlook = GetObject(Class:="Outlook.Application")

    If err.Number Then
    Set objOutlook = CreateObject("Outlook.Application")
    boolLaunched = True
    End If

    On Error GoTo Error_addAppointment

    If IsMissing(varMinutes) Then
    varMinutes = 0
    End If

    If Not objOutlook Is Nothing Then
    Set objAppointment = objOutlook.CreateItem(olAppointmentItem)

    With objAppointment
    .Subject = "Cust " & strID & " - " & strName & ", " &
    Format(strPhone, "(###) ###-####") & " " & strContact
    .Duration = 5
    .ReminderMinutesBeforeStart = varMinutes
    .ReminderSet = True
    '.Start = DateAdd("n", inttime + 5, Now())
    'inttime = inttime + 5

    If Not IsMissing(strMessage) Then
    .Body = strmessage
    End If

    .Display True ' Display modal form
    End With
    End If

    Set objAppointment = Nothing
    Set objOutlook = Nothing

    Exit_addAppointment:
    Exit Sub

    Error_addAppointment:
    msgbox error, vbCritical, "Error " & err & " - addAppointment"
    Resume Exit_addAppointment
    End Sub
     

Share This Page